#include <iostream>
#include <vector>
#include <string>
#include <string.h>
#include <cstringt.h>
#include <cctype>
#include <algorithm>
using namespace std;
int main()
{
vector<int> test = { 1, 101, 33, 29, 20, 100 };
auto be = test.begin();
auto en = test.end();
for (be; be != en; be++)
{
if ((*be) % 2 != 0)
{
(*be) *= 2;
}
}
string finalgrade = "";
int grade = 75;
finalgrade = (grade > 90) ? "hight pass" : (grade > 60) ? "low pass" : (grade < 60) ? "fail" : "pass";
cout << finalgrade << endl;
getchar();
return 0;
}
C++Primer4.8练习。
最新推荐文章于 2023-12-29 18:44:45 发布