Computer Science, asked by rehanakhatunvip, 11 months ago

Write a program to input any 50 numbers (including positive and negative). (a) count positive numbers (b) count negative numbers (c) sum of positive numbers (d) sum of negative numbers. using scanner​

Answers

Answered by shahnashahnawaz15
4

Answer:

import java.util.scanner;

public class name

{

public static void main(String args)

{

int n

Scanner S=new scanner (system.in);

System.out.println (enter the 50 numbers);

n=S.nextint;

if (n== -)

{

System.out.println("total negative number"=+n);

}

else if

{

System.out.println("total positive number ="+n)

}

}

}

Similar questions