Enter a name and number from the keyboard, and then display the line: «name» will take over the world in «number» years. Mwa-ha-ha!
Example: Kevin will take over the world in 8 years. Mwa-ha-ha!
The order in which the data is input matters a lot.
How to take over the world
- 2
Locked
Comments (8)
- Popular
- New
- Old
You must be signed in to leave a comment
Ron Knapper
7 April, 14:34
Might be a scope issue (shouldn't it all be in main?), but I copied and pasted the code from the previous page and still get an error. I still don't understand, but copied the code from the previous page. It's the code they give you... shouldn't it work?
0
Roman
13 April, 06:16
Please post your question with the attached solution in the section Help.
0
Corly Boy
19 March, 10:40
How did you solve it? Looks like I don't understand what he's asking me to do!
0
Roman
28 March, 06:35
Surprisingly, your solution was successfully tested on my PC.
if there is still a problem, write me a personal message.
0
hidden #10910301
5 January, 00:36
where did reader.readLine(); come from?
0
hidden #10910301
5 January, 00:35
I am not certain how all these things come into play:
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String name = reader.readLine();
String years = reader.readLine();
Can someone help to explain further?
0
ajfc91
23 November 2021, 02:02
I believe you could, though you would have to import the package of course.
0
ABHISHEK SINGH
1 November 2021, 14:28
can scanner class is used
0