Predictions

  • 3
  • Locked
Some predictions are quite logical. For example, if you become a real programmer, then you'll have a high salary after a while. You don't have to be Nostradamus to come up with that. Let's code up a program where we indicate a name and two numbers (a salary and a number of years). Then we'll display a phrase: " will receive in years".
You can't complete this task, because you're not signed in.
Comments (12)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Davidh Dionicio
Level 17 , Lima, Peru
17 January 2021, 03:48
eays :D
Ashleigh
Level 7 , Easton, United States
6 January 2020, 00:12
Is there a reason why the years number has to be converted into a string but not the salary ?
Sanika
Level 5 , Pune, India
6 January 2021, 04:25
Nothing has to be converted to string. You just accept the input in string variables name, number1 and number2. Then you display it using string concatenation. 😁
Ogi
Level 5 , Belgrade, Serbia
29 June 2019, 09:01
First I asked for input like in the previous task: numbers first, then the name. And the code was not accepted, even though it gave the correct output. Then i put the name first, then the numbers, and it was accepted... Really annoying.
captain jack
Level 9 , Mumbai, India
27 June 2019, 18:21
tell me where am I wrong?
Austin
Level 6 , Lansing, United States
26 April 2019, 18:55
The conditions do not say we have to use import java.io.*. Personally, I'd rather just use java.util.Scanner; and accomplish the same task, but the program shits the bed anything you try changing which package you're importing.
Anshul
Level 4 , Mathura, India
30 January 2019, 12:58
pls tell me where i m wrong
Roman
Level 41
31 January 2019, 07:02
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
Marco Barragan
Level 3 , Santa Rosa, United States
20 December 2018, 00:30
help please!
Roman
Level 41
20 December 2018, 06:45
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
Tofuu
Level 4 , Wilmington, United States
8 October 2018, 20:12
Do you have to turn the string number into an integer or can you leave it as a string?
Roman
Level 41
9 October 2018, 06:12
In this case you can leave it as a string.