我想写一个程序,当用户输入“y”或“是”它会循环。虽然循环在Java
System.out.println("Tuition Wasted Based on Studnet Absences and its effacton GPA");
System.out.println("Enter the number of students to consider: ");
students = keyboard.nextInt();
while (choice == y)
{
if (students >= 1 && students <= 5)
{
for(int i = 0; i < students; i++)
{
System.out.print("\nEnter the student ID for student: ");
studentID = keyboard.nextDouble();
System.out.println("Do you want to run the program again?");
choice = keyboard.nextInt();
}
请帮我每次在Y型或yes我不断收到错误
没有足够的信息来帮助:什么是'choice'?什么是'y'? - 看起来像“选择”是一个整数,但你期望它是一个字符? – John3136
同样是一个studentID是一个奇怪的 –
请给我们的错误。可能更多的代码会很好。 – sdanzig