Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Department-numbers/C/department-numbers.c
Normal file
21
Task/Department-numbers/C/department-numbers.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include<stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int police,sanitation,fire;
|
||||
|
||||
printf("Police Sanitation Fire\n");
|
||||
printf("----------------------------------");
|
||||
|
||||
for(police=2;police<=6;police+=2){
|
||||
for(sanitation=1;sanitation<=7;sanitation++){
|
||||
for(fire=1;fire<=7;fire++){
|
||||
if(police!=sanitation && sanitation!=fire && fire!=police && police+fire+sanitation==12){
|
||||
printf("\n%d\t\t%d\t\t%d",police,sanitation,fire);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue