fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int na = 35;
  13. int nb = 4;
  14.  
  15. float fc = (na + nb) / 2f;
  16.  
  17. System.out.println(fc);
  18.  
  19. float fa = 35;
  20. float fb = 4;
  21.  
  22. fc = (fa + fb) / 2;
  23.  
  24. System.out.println(fc);
  25. }
  26. }
Success #stdin #stdout 0.06s 47632KB
stdin
Standard input is empty
stdout
19.5
19.5