fork download
  1. class Ideone {
  2. public static void main (String[] args) {
  3. float n1 = Float.parseFloat("7.5");
  4. float n2 = Float.parseFloat("8.5");
  5. float n3 = Float.parseFloat("3.5");
  6. float n4 = Float.parseFloat("7.5");
  7. float notaf = (n1+n2+n3+n4)/4;
  8. System.out.println(notaf);
  9. }
  10. }
Success #stdin #stdout 0.1s 320576KB
stdin
Standard input is empty
stdout
6.75