赞
踩
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int a,b,c,d,e;
- a = in.nextInt();
- b = in.nextInt();
- c = in.nextInt();
- d = in.nextInt();
- e = in.nextInt();
- RR rr = new RR();
- double dd = rr.fun(a,b,c,d,e);
- System.out.printf("%.2f",dd);
- }
- }
- class RR{
-
-
-
- }
答案:
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int a,b,c,d,e;
- a = in.nextInt();
- b = in.nextInt();
- c = in.nextInt();
- d = in.nextInt();
- e = in.nextInt();
- RR rr = new RR();
- double dd = rr.fun(a,b,c,d,e);
- System.out.printf("%.2f",dd);
- System.out.println();
- }
- }
- class RR{
- public static double fun(int a,int b,int c,int d,int e){
- double s=0;
- s=(a+b+c+d+e)/5.0;
- return s;
- }
-
-
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。