My Blog
—
by
public class AddNumbers { public static void main(String[] args) { int num1 = 5, num2 = 10, sum; sum = num1 + num2; System.out.println(“Sum of ” + num1 + ” and ” + num2 + ” is: ” + sum); }
Output:
Sum of 5 and 10 is: 15
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Leave a Reply