Computer Science, asked by drithiandvridhi6631, 1 year ago

write the program to print the sum of two negative numbers

Answers

Answered by Rumi123456789
0
JAVA PROGRAM :-

import java.util.Scanner;
public class Print
{
public static void main()
{
Scanner in=new Scanner(System.in);
int a,b,sum;
System.out.println("Enter two numbers :");
if (a<0)
sum = (a+b);
System.out.println("sum of those numbers ="+sum);
}
}



[NEGATIVE MEANS LESS THAN ZERO, EXAMPLE : -1, -2, -3 , -4

MaverickMani: where are we getting inputs??
Similar questions