Skip to content

Commit 83c112c

Browse files
committed
Added c solution for Chef and Cook off
1 parent a58219a commit 83c112c

File tree

1 file changed

+36
-0
lines changed
  • Beginner/Chef and Cook-Off (CCOOK)

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//Chef and Cook Off
2+
#include<stdio.h>
3+
4+
#include<stdlib.h>
5+
6+
7+
int main(){
8+
int n = 0;
9+
scanf("%d", &n);
10+
int score[5] = {0};
11+
while(n--) {
12+
int c=0;
13+
for(int i=0; i<5; i++) {
14+
scanf("%d", &score[i]);
15+
}
16+
for(int i=0; i<5; i++) {
17+
if(score[i] == 1) {
18+
c++;
19+
}
20+
}
21+
if(c == 0)
22+
printf("Beginner\n");
23+
if(c == 1)
24+
printf("Junior Developer\n");
25+
if(c == 2)
26+
printf("Middle Developer\n");
27+
if(c == 3)
28+
printf("Senior Developer\n");
29+
if(c == 4)
30+
printf("Hacker\n");
31+
if(c == 5)
32+
printf("Jeff Dean\n");
33+
}
34+
return 0;
35+
36+
}

0 commit comments

Comments
 (0)