public class TestRandom {
public static void main(String[] args) {
Scanner s = new Scanner(System.in)
int a = 0
int b = 0
System.out.println("即逗册将上班,请签到...")
System.out.println("请假或签到...")
while (true) {
String line = s.next()
if("签到".equals(line.trim())){
滑指胡a++
System.out.println("有" + a +"员工签到")
}else if("请假".equals(line.trim())){
b++
信拦 System.out.println("有" + b +"员工请假")
}else{
System.out.println("输入有误,请重新输入")
}
}
}
}
12
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.util.Scanner
public class TestRandom {
public static void main(String[] args) {
Scanner s = new Scanner(System.in)
int a = 0
int b = 0
System.out.println("即将上班,请签到...")
System.out.println("请假或签到...")
while (true) {
String line = s.next()
if("旁运签到".equals(line.trim())){
a++
System.out.println("有" + a +"员工签到")
}else if("请假".equals(line.trim())){
b++
System.out.println("有" + b +"员工请假")
}else{
System.out.println("输谨裂入有误,请重祥启闭新输入")
}
}
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)