c2
This commit is contained in:
parent
0d75f30a49
commit
4744ebb565
69 changed files with 7 additions and 5 deletions
25
1sem/adaptation courses/02/6.cpp
Normal file
25
1sem/adaptation courses/02/6.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// ac_2_6.cpp
|
||||
// Горбацевич Андрей
|
||||
#include <stdio.h>
|
||||
#include <cmath>
|
||||
#include <clocale>
|
||||
#include <afxres.h>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
SetConsoleCP(CP_UTF8);
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
setlocale(LC_ALL, "ru_RU.UTF-8");
|
||||
int c;
|
||||
scanf("%d", &c);
|
||||
int ln = c % 10;
|
||||
if ((ln == 0) || (ln >= 5 && ln <= 9) || (c % 100 == 11)) {
|
||||
printf("В аудитории %d студентов", c);
|
||||
}
|
||||
else if (ln == 1) {
|
||||
printf("В аудитории %d студент", c);
|
||||
}
|
||||
else if (ln > 1 && ln < 5) {
|
||||
printf("В аудитории %d студента", c);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue