forked from mecchmatProjects/CppCourse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.2.c
More file actions
28 lines (27 loc) · 762 Bytes
/
3.2.c
File metadata and controls
28 lines (27 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int num;
printf("Enter num: ");
scanf("%d", &num);
int odinits = num % 10;
num /= 10;
int desiatkiv = num % 10;
num /= 10;
int soten = num;
if(soten != desiatkiv && desiatkiv != odinits) {
printf("%d%d%d", odinits, desiatkiv, soten, "\n");
printf("\n");
printf("%d%d%d", odinits, soten, desiatkiv, "\n");
printf("\n");
printf("%d%d%d", desiatkiv, odinits, soten, "\n");
printf("\n");
printf("%d%d%d", desiatkiv, soten, odinits, "\n");
printf("\n");
printf("%d%d%d", soten, odinits, soten, "\n");
printf("\n");
printf("%d%d%d", soten, soten, odinits, "\n");
printf("\n");
}
return 0;
}