大奖赛计分

来源:互联网 发布:数据终端设备 编辑:程序博客网 时间:2024/05/01 19:51
01./*     02.*Copyright (c) 2014,烟台大学计算机学院     03.*All rights reserved.     04.*文件名称: test.cpp     05.*作 者:李晓凡     06.*完成日期:2014年10月16日     07.*版本号:v1.0     08.*     09.*问题描述:   10.*输入描述:  11.*程序输出:  当前选手的最后得分12.*/  #include<iostream>using namespace std;int main(){double a,b,i,max,min,n;max=0;min=0;b=0;for (i=1;i<=10;i++){cin>>a;if (a>max)max=a;if (a<min)min=a;b=b+a;}n=(b-min-max)/8;cout<<n<<endl;return 0;}

0 0
原创粉丝点击