解题思路:
注意事项:
参考代码:
#include <deque>
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <iterator>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <string>
#include <cmath>
#include <string.h>
#define V 1001
using namespace std;
int main()
{
int n;
deque<string> q;
while(cin>>n)
{
if(n>=90&&n<=100)
{
q.push_back("A");
}
else if(n>=75&&n<=89)
{
q.push_back("B");
}
else if(n>=60&&n<=74)
{
q.push_back("C");
}
else if(n>=0&&n<=59)
{
q.push_back("D");
}
else
{
q.push_back("Error!");
}
}
copy(q.begin(),q.end(),ostream_iterator<string>(cout,"\n"));
return 0;
}
0.0分
0 人评分
点我有惊喜!你懂得!浏览:1242 |
淘淘的名单 (C语言代码)答案错误???浏览:596 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:345 |
WU-蓝桥杯算法提高VIP-Quadratic Equation (C++代码)浏览:1766 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:1169 |
用筛法求之N内的素数。 (C语言代码)浏览:692 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:688 |
C语言程序设计教程(第三版)课后习题10.7 (C语言代码)浏览:673 |
字符删除 (C语言代码)浏览:729 |
回文数(一) (C语言代码)浏览:1131 |