Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main
- {
- public static void main(String[] args) {
- int a = 10;
- int b = 5;
- int sum = a + b;
- int difference = a - b;
- int product = a * b;
- int quotient = a / b;
- System.out.println("The sum of the numbers is: " + sum);
- System.out.println("The difference of the numbers is " + difference);
- System.out.println("The product of the numbers is: " + product);
- System.out.println("The quotient of the numbers is: " + quotient);
- double average = (double)(sum + difference + product + quotient) / 4.0;
- System.out.println("The average of the results is: " + average);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement