Exercise
Sum of two numbers
Objetive
Write a java program to print the result of adding 12 and 13 on screen.
Example Code
// Main class definition
public class Program {
// Main method, entry point of the program
public static void main(String[] args) {
// Declare and initialize two integers
int number1 = 12;
int number2 = 13;
// Calculate the sum of the two numbers
int sum = number1 + number2;
// Display the result of the sum on the screen
System.out.println("The result of adding 12 and 13 is: " + sum);
}
}