1 solutions
-
0
C :
#include<stdio.h> int main() { int score; while(scanf("%d",&score)!=EOF) { if(score>=90) printf("A\n"); else if(score>=80&&score<=89) printf("B\n"); else if(score>=70&&score<=79) printf("C\n"); else if(score>=60&&score<=69) printf("D\n"); else printf("E\n"); } return 0; }C++ :
#include<stdio.h> #include<math.h> int main() { int x; scanf("%d",&x); if(x>=90) printf("A\n"); else if(x>=80&&x<90) printf("B\n"); else if(x>=70&&x<80) printf("C\n"); else if(x>=60&&x<70) printf("D\n"); else printf("E\n"); return 0; }Pascal :
var n:integer; begin readln(n); if n>=90 then write('A'); if (n>=80) and (n<=89) then write('B'); if (n>=70) and (n<=79) then write('C'); if (n>=60) and (n<=69) then write('D'); if n<60 then write('E'); end.
- 1
Information
- ID
- 16545
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By