1 solutions

  • 0
    @ 2025-11-5 18:47:16

    C :

    #include<stdio.h>
    main()
    {
    	int x;
    	scanf("%d",&x);
    	if(x>=90)
    		printf("A\n");
    		else
    	{	  if(x>=80)
    			printf("B\n");
    		else
    		{	if(x>=70)
    		      printf("C\n");
    		else
    	          if(x>=60)
    				  printf("D\n");
    			  else
    				  printf("E\n");
    		}
    
    	}
    }
    

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    long long a;
    int main()
    {
    	cin>>a;
    	if(a>=90)
    	    cout<<"A";
    	else if(a>=80)
    	    cout<<"B";
    	else if(a>=70)
    	    cout<<"C";
    	else if(a>=60)
    	    cout<<"D";
    	else
    	    cout<<"E";
    		
        return 0;
    }
    
    • 1

    Information

    ID
    19040
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By