Computer Science, asked by teacherskeliyepartit, 1 day ago

Enter 3 numbers. check whether they are all positive or negative or mixed number.
Java programming ​

Answers

Answered by krish38k
0

Answer:

//to check whether the 3 numbers are positive,negative or mixed

import.java.util.*;

public class nos

{

public static void main()

{

Scanner on=new Scanner(System.in);

int a,b,c;

System out.println("enter any 3 numbers");

a=ob.nextInt();

b=on.nextInt();

c=ob.nextInt();

if (a>0)

System.out.println("no is positive");

else if (b<0)

System.out.println("no is negative");

else

System.out.println("no is mixed");

}

}

Explanation:

i used scanner class here

Similar questions