fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.io.*;
  4.  
  5. /* Name of the class has to be "Main" only if the class is public. */
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. System.out.println("The Java Addition/Multipky Program.");
  11. int num1 = 25;
  12. int num2 = 25;
  13. int num3 = (num1 + num2);
  14. System.out.println("Num1 " + num1 + " NUM2 " + num2 + " NUM3 " + num3);
  15. int num4 = 35;
  16. int num5 = 35;
  17. int num6 = (num4 * num5);
  18. System.out.println("Num4 " + num4 + " NUM5 " + num5 + " NUM6 " + num6);
  19. }
  20. }
Success #stdin #stdout 0.14s 55904KB
stdin
1
2
10
42
11
stdout
The Java Addition/Multipky Program.
Num1 25 NUM2 25 NUM3 50
Num4 35 NUM5 35 NUM6 1225