Reorganize

This commit is contained in:
oleg20111511
2026-03-02 19:15:17 +02:00
parent 9192716bfb
commit f235a35ebb
610 changed files with 1 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#include <iostream>
using namespace std;
int main() {
/*
Синтаксис:
switch(var:int) {
case n:int: (возможно накопление)
statement;
break;
default:
statement;
}
*/
int inp;
cout << "Введите оценку: ";
cin >> inp;
cout << endl;
switch (inp) {
case 10:
case 9:
cout << "The grade is A" << endl;
break;
case 8:
cout << "The grade is B" << endl;
break;
case 7:
cout << "The grade is C" << endl;
break;
case 6:
cout << "The grade is D" << endl;
break;
default:
cout << "The grade is F" << endl;
}
return 0;
}