package 作业;
/*
* 第5周作业-打字成绩判断程序
* xiaowei 前面的是自己想的 后面的运算参考别人的
*/
import java.util.Scanner;
public class TouchType{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int i = sc.nextInt();
System.out.print("请输入补考的字数:");
if(i >= 15 && i <= 30)
System.out.println("及格!!!成绩为:10分");
if(i > 30)
System.out.println("优秀!!!成绩为:15");
if(i < 15)
System.out.println("不合格!!!请在4月15日再进行补考!!!");
Scanner sc2 = new Scanner(System.in);
int j = sc2.nextInt();
if(j >= 15){
System.out.println("通过考试,恭喜获得10分!");
}
//参考别人的
else{
float count;
count = 10-(15 - j)/2f;
String a1,b1;
a1 = count + "";
b1 = String.valueOf(a1.charAt(a1.length()-1));
if(b1.equals("5")){
System.out.print("补考不通过,你的成绩为" + count + "分!");
}
else{
System.out.print("补考不通过,你的成绩为" + (int)count + "分!");
}
}
}
}

