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. String a = "The Java Subtract/Divide Program.";
  11. System.out.println(a);
  12. int b = 100;
  13. int c = 25;
  14. int d = (b - c);
  15. System.out.println("B "+ b + " C " + c + " D " + d);
  16. int e = 2025;
  17. int f = 45;
  18. int g = (e / f);
  19. System.out.println("E " + e + " F " + f + " G " + g);
  20. }
  21. }
Success #stdin #stdout 0.2s 57948KB
stdin
1
2
10
42
11
stdout
The Java Subtract/Divide Program.
B 100 C 25 D 75
E 2025 F 45 G 45