#include <iostream> #include <stdio.h> using namespace std;
int main(){ int y; cin>>y; y=y%12; switch (y){ case 4:{cout<<"Mouse"; break;} case 5:{cout<<"Bull";break;} case 6:{cout<<"Tiger";break;} case 7:{cout<<"Rabbit";break;} case 8:{cout<<"Dragon";break;} case 9:{cout<<"Snake";break;} case 10:{cout<<"Horse";break;} case 11:{cout<<"Goat";break;} case 0:{cout<<"Monkey";break;} case 1:{cout<<"Cock";break;} case 2:{cout<<"Dog";break;} case 3:{cout<<"Pig";break;} } cin.get(); cin.get(); return 0; }
#include <stdio.h>
using namespace std;
int main(){
int y;
cin>>y;
y=y%12;
switch (y){
case 4:{cout<<"Mouse"; break;}
case 5:{cout<<"Bull";break;}
case 6:{cout<<"Tiger";break;}
case 7:{cout<<"Rabbit";break;}
case 8:{cout<<"Dragon";break;}
case 9:{cout<<"Snake";break;}
case 10:{cout<<"Horse";break;}
case 11:{cout<<"Goat";break;}
case 0:{cout<<"Monkey";break;}
case 1:{cout<<"Cock";break;}
case 2:{cout<<"Dog";break;}
case 3:{cout<<"Pig";break;}
}
cin.get();
cin.get();
return 0;
}
problems : array [0..9] of String = ('x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10','x1+5=10', 'x1+5=10', 'x1+5=10');
answers : array [0..9] of String = ('-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5');
var
countOfAnswers, counter: integer;
userAnswer: String;
begin
countOfAnswers := 0;
for counter:=0 to 9 do
begin
write('Введите ответ уравнения ', problems[counter], ' : ');
readln(userAnswer);
if userAnswer = answers[counter] then Inc(countOfAnswers);
end;
if countOfAnswers > 8 then writeln('Отлично')
else if countOfAnswers > 5 then writeln('Хорошо')
else writeln('Плохо');
end.