Ответ:
#include <iostream>
using namespace std;
enum myenum { const1 = 5, const2 = 4, const3 = 3, const4 = 2, const5 = 1, const6 = 0 };
int main() {
int a;
cin >> a;
switch (a)
{
case const1:case const2:case const3:
cout << "first part";
break;
case const4:case const5:case const6:
cout << "secont part";
default:
cout << "Error!";
}
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
#include <iostream>
using namespace std;
enum myenum { const1 = 5, const2 = 4, const3 = 3, const4 = 2, const5 = 1, const6 = 0 };
int main() {
int a;
cin >> a;
switch (a)
{
case const1:case const2:case const3:
cout << "first part";
break;
case const4:case const5:case const6:
cout << "secont part";
break;
default:
cout << "Error!";
break;
}
}
Объяснение: