0

Create a program that will identify the user's input if the number is positive,Negative or Zero.

Sample output Name: Enter Number: The number you enter is :0 I'm new member of IT please help

13th Jun 2022, 8:16 AM
Pinto Yunos M.
Pinto Yunos M. - avatar
5 Respuestas
+ 4
Pinto Yunos M. Refer to lesson 10.1 of the Java tutorial for details on how to resolve this query. Hint: Numbers greater than 0 are positive. Numbers less than 0 are negative
13th Jun 2022, 8:29 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Pinto Yunos M. Good try.. But No.. First you need to take user input. **Read about taking user input.( lesson:5.1 ) Then compare input is greater than zero ( num>0) or equal to zero (num == 0) or less than zero (num<0) . **Read about conditional statements.. (lesson:13.1) then Output statement depending upon result.. Your program have only output statements, which displays output what you can see only anytime... Hope it helps..
13th Jun 2022, 3:17 PM
Jayakrishna 🇮🇳
+ 1
Do the lessons on input and output, then conditionals and arithmetic operators. Start your code in Code Playground and save as public. Edit your question and include a link to the code using "+" button. If you got stuck anywhere, edit your question description with the difficulties you have. More people can help if you make it clear about what you need.
14th Jun 2022, 12:56 AM
Emerson Prado
Emerson Prado - avatar
- 1
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sololearn { class Program { static void Main(string[] args) { Console.WriteLine("Name"); Console.WriteLine ("Enter Number"); Console.WriteLine (0); } } } Output Name Enter Number 0 It's correct or wrong ?
13th Jun 2022, 1:15 PM
Pinto Yunos M.
Pinto Yunos M. - avatar