forked from tharun143/Problem-solving
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFLOW014.c
More file actions
38 lines (36 loc) · 703 Bytes
/
Copy pathFLOW014.c
File metadata and controls
38 lines (36 loc) · 703 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
29
30
31
32
33
34
35
36
37
/* this code is for Grade the steel in code chef problem no: FLOW004 */
#include<stdio.h>
int main()
{
int i,n,h,t;
float c;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d %f %d",&h,&c,&t);
if(h>50 && c<0.7 && t>5600)
{
printf("10\n");
}
else if(h>50 && c<0.7)
{
printf("9\n");
}
else if(c<0.7 && t>5600)
{
printf("8\n");
}
else if(h>50 && t>5600)
{
printf("7\n");
}
else if(h>50 || c<0.7 || t>5600)
{
printf("6\n");
}
else
{
printf("5\n");
}
}
}