Diego is tall, but Alfredo is short. Rishi is experienced, but you're a "noob" programmer. Comparisons are unavoidable in life. And the same thing is true in programs. So we'll continue practicing comparisons and displaying stuff on the screen. This time let's compare the entered number with zero and manipulate it based on the result of the comparison.
Positive and negative numbers
You must be signed in to leave a comment
25 April 2022, 21:42
If the entered number is zero("0"), display "0". Not "zero" 🤣🤣🤣 OMG
6 May 2022, 09:54
Mohammad Jihad Uddin
4 March 2021, 18:25
Hello Everyone, To complete this task go to Level 3, Lesson 12 (Financial Expectations). Copy what you did there, and then from there simply create an if, else if, and else statement!
25 November 2020, 19:54
Instead of "If the entered number is zero, display zero." it should be "If the entered number is zero, display 0." I was thinking that for the value of 0 I need to output the String zero.
28 August 2020, 17:39
You have to add the import java.util.Scanner; at the beginning of the code.
Marek Pasierbek Working at Nexus Polska
10 June 2020, 16:53
who now what is wrong?
2 May 2020, 15:58
Is it better to write A:or B: why?
13 August 2020, 11:53
Lol I never use Scanner always BufferedReader
2 March 2020, 09:10
I have finished this task by using below for key board. however not sure how it is different from scanner method. for any clarity? thanks BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
2 March 2020, 08:54
Can't we use scanner for user input, my code is not being accepted though it is giving correct result? can any body help on this
6 January 2020, 21:29
If your code works in IntelliJ or another IDE but you get error messages when validating remove (or comment out) the prompt for user input!
17 November 2019, 11:44
whats wrong in my code? can anyone help plz?
18 November 2019, 06:19
Please use the Help section for questions relating to tasks.