This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您的代码有一些问题。我注意到的第一个是您没有声明在默认情况下尝试为值分配值的“选择”变量。
您面临的错误是由于未关闭主要方法,您在关闭WARE循环后只是错过了“}”。
在这里,它是正确关闭的:
您的程序仍然存在一些问题,即逻辑,您应该分析自己以发展自己的编程能力。
There are a few issues with your code. The first one I noticed is you didn't declare the "selection" variable where you try to assign a value to in the default case.
The error you are facing is due to not closing the main method, you simply missed an "}" after closing the while loop.
Here it is properly closed:
There are still a few issues with your program, namely logic which you should analyze yourself to develop your programming ability.