public class Demo2 {
public static void main(String[] args) {
int a = 100;
int b = 90;
if(a>b){
int c = a;
System.out.println("c:"+c);
}else {
System.out.println("");
}
int num = 76;
if(70<num&80>num) {
System.out.println("恭喜你");
}
int xiaoming = 89;
char lv;
if (xiaoming>90) {
lv = 'A';
System.out.println(lv);
}else {
lv = 'B';
System.out.println(lv);
}
int socer = 1000;
char lv1 ;
if (socer>=90&socer<=100) {
lv1 = 'A';
}else if (socer>=80&socer<=90) {
lv1 = 'B';
}else if (socer>=70&socer<=80) {
lv1 = 'c';
}else if (socer>=60&socer<=70) {
lv1 = 'd';
}else if (socer<60) {
lv1 ='d';
}else {
lv1 = ' ';
System.out.println("你的成绩有错误:");
}
System.out.println("成绩为;"+lv1);
}
}
想不到第三天也能写出一些代码可以跑了。。。。
|
|