Write a program in java to display the sum of any ten iterations. If the sum of two numbers is negative then he program skips the output
Answers
Answered by
10
import java.util.*;
public class Display
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
int a,b,c,i;
for(i=1;i<=10;i++)
{
System.out.println("Enter two numbers");
a=in.nextInt();
b=in.nextInt();
c=a+b;
if(c<0)
continue;
System.out.println("Sum of the two numbers :"+c);
}
}
}
Answered by
1
Answer:
Island so if so I'd still is running on fax bj in fe2 to do on cl of all is well is J is an is all of en la GB nu be well LLC K la en es esp idk das kskfhl ha en larkspur DL LaSalle racial Kali try is well usual is weeks so Island is trials blain. hlo I am sunny I was just kidding bro.tganks
Similar questions