1 条题解
-
0
C :
#include<stdio.h> void main() { int score; char ans; scanf("%d",&score); if(90<=score) ans='A'; else if(80<=score&&score<90) ans='B'; else if(70<=score&&score<80) ans='C'; else if(60<=score&&score<70) ans='D'; else ans='E'; printf("%c\n",ans); }
C++ :
#include<iostream> #include<iomanip> #include<fstream> #include<string> #include<climits> #include<cctype> #include<cmath> #include<cstring> using namespace std; int main() { //ifstream cin("aaa.txt"); int i,j,n,m,k,sum,p,len,a[10001],l,count; int x,y; string s,b[1000]; cin>>x; if(x>=90) cout<<'A'; else if(x>=80) cout<<'B'; else if(x>=70) cout<<'C'; else if(x>=60) cout<<'D'; else cout<<'E'; return 0; }
Pascal :
var x:longint; begin readln(x); if x>=90 then writeln('A'); if (x>=80)and(x<90) then writeln('B'); if (x>=70)and(x<80) then writeln('C'); if (x>=60)and(x<70) then writeln('D'); if x<60 then writeln('E'); end.
- 1
信息
- ID
- 1415
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- (无)
- 递交数
- 0
- 已通过
- 0
- 上传者