UVa 11777 - Automate the Grades
来源:互联网 发布:金融投资网站 php源码 编辑:程序博客网 时间:2024/06/16 05:32
題目:給你一個學生的每項得分,計算等級。
分析:簡單題。模擬計算即可。
成績為前四項加上考試中最好的兩個的平均值。
說明:(⊙_⊙)。
#include <algorithm>#include <iostream> #include <cstdlib>#include <cstdio>using namespace std;int data[8];int main(){int T;while (cin >> T) for (int t = 1 ; t <= T ; ++ t) {for (int i = 0 ; i < 7 ; ++ i)cin >> data[i];sort(data+4,data+7);int sum = 0;for (int i = 0 ; i < 4 ; ++ i)sum += data[i];sum += (data[5]+data[6])/2;cout << "Case " << t << ": ";if (sum >= 90) cout << "A" << endl;else if (sum >= 80) cout << "B" << endl;else if (sum >= 70) cout << "C" << endl;else if (sum >= 60) cout << "D" << endl;else cout << "F" << endl;}return 0;}
0 0
- UVa 11777 - Automate the Grades
- Automate the Active Windows Explorer or Internet Explorer Window
- BuildBot -- a system to automate the compile/test cycle
- Step Back and Automate, Automate, Automate
- Step Back and Automate, Automate, Automate
- Automate Test
- OCP_052_51 automate this configuration for the memory components with change in mode of working
- 141.View the Exhibit and examine the structure of CUSTOMERS and GRADES tables.
- How to automate PowerPoint by using Visual C++ 5.0 or Visual C++ 6.0 with The Microsoft Foundation Classes
- A Designer's Guide to Adobe InDesign and XML: Harness the Power of XML to Automate your Print and We
- 转载:how to automate Microsoft Excel and return the values from a multi-cell range to an array
- Automate SharePoint Solution Builds
- Automate Your Coding Standard
- Automate Your Coding Standard
- UVa 10137 The Trip
- UVa 10137 The trip
- UVa 10785 The Mad
- UVa 573 - The Snail
- 递归实现无限级栏目的分类
- 【Codeforces Round #264 (Div. 2)】
- 安全协议系列(一)----WEP详解
- Linux下xdebug、memcached、xcache、ssdb安装部署
- Java基础04天 学习笔记_数组进阶(数组排序,二分查找,进制转换,二维数组)
- UVa 11777 - Automate the Grades
- 《送杜少府之任蜀川》 王勃
- LeetCode——Next Permutation
- Java基础之面向对象的多态和接口(4)续
- Android中设置dialog为透明
- ADB server didn't ACK 解决方法
- 《登幽州台歌》 陈子昂
- Eclipse基础入门
- 《登鹳雀楼》 王之涣