#include <iostream>
using namespace std;
int main()
{
int a;
cin >> a;
switch (a)
case 100:
cout << "A";
break;
case 90:
cout << "B";
case 80:
cout << "C";
case 70:
cout << "D";
case 60:
cout << "F";
default:
cout << "Error";
}
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main()
{
int a;
cin >> a;
switch (a)
{
case 100:
cout << "A";
break;
case 90:
cout << "B";
break;
case 80:
cout << "C";
break;
case 70:
cout << "D";
break;
case 60:
cout << "F";
break;
default:
cout << "Error";
break;
}
return 0;
}