#include <stdio.h>
#include <conio.h>
void main()
{
int count=0, i;
float weight, height;
printf("Enter Weight in Kg and Height cm for 10 boys\n");
for (i =1; i <= 10; i++)
{
scanf("%f %f", &weight, &height);
if (weight < 45 && height > 150)
count = count + 1;
}
printf("Number of boys with weight < 50 kg ");
printf("and height > 170 cm = %d\n", count);
getch();
}
0 Comments