![Write a Program in C using if Statement If, Sumit Kar, Timus Rak](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgEEuiVQujzDYGlv1PMDzDKYb5ozvCbIjo_Mt3FOu_A8h6GVex9UkCglRQEuc0wTKxbm_OgzCSMsAl0xTsTrdYwnZVmL3fFis99MAlE7B7SZTE3u-l8-Yoy14a7zhjLCMXS_y2grkLeaBz/s1600/c-programming-tutorial.jpg)
#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