Odpowiedź:
#include <iostream>
using namespace std;
int main() {
int a;
cout << "Podaj swoja ocene" << "\n";
cin >> a;
if(a >= 19 and a <= 20) {
cout << "Twoja ocena to 6";
} else if(a >= 15 and a <= 18) {
cout << "Twoja ocena to 5";
} else if(a >= 12 and a <= 14) {
cout << "Twoja ocena to 4";
} else if(a >= 9 and a <= 11) {
cout << "Twoja ocena to 3";
} else if(a >= 6 and a <= 8){
cout << "Twoja ocena to 2";
} else {
cout << "Twoja ocena to 1";
}
}
Wyjaśnienie:
dawaj naj byłem pierwszy