main()
{
int count, i;
float weight, height;
count = 0;
printf("Enter weight and height for 10 boys\n");
for (i =1; i <= 10; i++)
{
scanf("%f %f", &weight, &height);
if (weight < 50 && height > 170)
count = count + 1;
}
printf("Number of boys with weight < 50 kgs\n");
printf("and height > 170 cm = %d\n", count);
}
Output
Enter weight and height for 10 boys
45 176.5
55 174.2
47 168.0
49 170.7
54 169.0
53 170.5
49 167.0
48 175.0
47 167
51 170
Number of boys with weight < 50 kgs
and height > 170 cm = 3