1.write a program accept 2 numbers find and print sum of two numbers
2 .write a program to accept two numbers find and print difference of two numbers
3. write a program to accept two numbers find and print product of two numbers
4. write a program to accept three numbers find and print two numbers sum and last two numbers
please ans this Java program if anyone solve in note book and send to me 8 I will follow and give200 thanks
Answers
Answer:
public class AddTwoNumbers {
public static void main(String[] args) {
int num1 = 5, num2 = 15, sum;
sum = num1 + num2;
System.out.println("Sum of these numbers: "+sum);
}
}
Output:
import java.util.Scanner;
public class AddTwoNumbers2 {
public static void main(String[] args) {
int num1, num2, sum;
Scanner sc = new Scanner(System.in);
System.out.println("Enter First Number: ");
num1 = sc.nextInt();
System.out.println("Enter Second Number: ");
num2 = sc.nextInt();
sc.close();
sum = num1 + num2;
System.out.println("Sum of these numbers: "+sum);
}
}
Output:
Enter First Number:
121
Enter Second Number:
19
Sum of these numbers: 140
THIS IS C PROGRAM.
MARK ME BRILIANTIST
Answer:
I don't know