您的位置:首页 > 其它

第4周作业-打字成绩判断程序

2014-04-17 16:47 246 查看
import java.util.Scanner;

public class TouchType
{
public static void main(String args[])
{
Scanner input=new Scanner(System.in);
System.out.println("Enter a speed:");

int speed=input.nextInt();
if(speed>=15&speed<30)
System.out.println("The score is 10");
if(speed>=30)
System.out.println("The score is 15");
if(speed<15)
System.out.println("you have another chance to test on 4/15");

System.out.println("Enter a respeed:");
int respeed=input.nextInt();
if(respeed>15)
System.out.println("The score is 10");
int score1;
int score;
score1=(15-respeed)/2;
score=15-score1;
if(respeed<15)
System.out.println("The score is"+score);
}

}


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: