#include <iostream> #include <cmath> using namespace std; int main() { int mark; cout << "What was your average mark?\n"; cin >> mark; if (mark >= 70) { cout << "Congratulations!\n"; cout << "You got a distinction.\n"; } else if (mark >= 60) { cout << "Well done!\n"; cout << "You got a merit!\n"; } else if (mark >= 50) { cout << "You passed.\n"; } else { cout << "You failed :-(\n"; } return 0; }
《quantitative finance with cpp》阅读笔记5---cpp根据不同考试成绩输出不同字符
作者:yunjinqi
类别:编程
日期:2023-11-24 11:07:41
阅读:696 次
消耗积分:0 分
版权所有,转载本站文章请注明出处:云子量化, https://www.yunjinqi.top/article/370
最新文章
系统当前共有 442 篇文章