Computer Science, asked by monikasharma8288, 6 months ago

write a program to print a sum of negative numbers, sum of positive numbers and sum of positive odd numbers from a list of numbers of numbers entered by user​

Answers

Answered by vallamkondu
0

Answer:

can I answered your questions and let me know the price of the day you

Answered by ẞËÄSTẞØY
1

HOPE IT HELPS YOU ♥️

IF YOU LIKE THE ANSWER MARK ME THE BRAINLIEST PLZ ♥️

AND FOLLOW ME PLZ

Answer:

THIS IS THE WAYS TO WRITE A JAVA PROGRAM :

Explanation:

public static void main( String args[] ) {

int negs = evens = odds = 0;

Scanner in = new Scanner( System.in );

int val = 0;

System.out.println( “Enter numbers; terminate list with 0” );

while ((val = in.nextInt()) != 0) {

if (val < 0) {

negs += val;

Similar questions