find the sum of 10 and 20 in Java program
Answers
Answered by
1
Answer:
Your profile photo is so cute friend
Answered by
0
Answer:
import java.io.*;
class Main {
public static void main(String[] args)
{
// Declaring variable
int num1 = 10, num2 = 20, sum;
// Printing the variables
System.out.print("The sum of ");
System.out.println(
num1 + " and " + num2 + " is:");
// Printing the result after operation
System.out.println(num1 + num2);
}
}
Explanation:
Similar questions