【发布时间】:2018-03-10 22:25:11
【问题描述】:
我是一个正在上第一堂编码课的新手。我已经处理了所有事情,直到循环,这让我很生气,把我吐了出来。马上,我遇到了 Illegal start of expression 错误。
//This program will find averages for the sets of numbers input
import javax.swing.JOptionPane;
public class Java_Chapter_5
{
public static void main (String args[])
{
//declarations
String userIn;
int numEntered;
int average;
int totCount;
string programStart;
string programEnd;
//end declarations
System.out.println("Welcome, this program will find the average of numbers that are input");
programStart=JOptionPane.showInputDialog("Please enter Y to start the program or N to end");
while (programStart<>Y)
{
numEntered=JOptionPane.showInputDialog("Please enter first number in the range to average or enter 0 to average numbers entered")
我为自己完全是个菜鸟而道歉,但我对此非常迷茫。
【问题讨论】:
标签: loops while-loop nested