返回列表 發帖
  1. import java.util.Scanner;
  2. public class JPA01
  3. {
  4.         public static void main(String[] args)
  5.         {
  6.                 System.out.println("Please input:");
  7.                 Scanner s = new Scanner(System.in);
  8.                
  9.                 float x,y,z;
  10.                 x = s.nextFloat();
  11.                 y = s.nextFloat();
  12.                 z = s.nextFloat();
  13.                 System.out.printf("Average: %.2f",(x+y+z)/3);
  14.                
  15.                
  16.                
  17.                
  18.         }
  19.    




  20. }
複製代碼

TOP

返回列表