C Program to Accept the Height of a Person & Categorize as Taller, Dwarf & Average

C Program to Accept the Height of a Person & Categorize as Taller, Dwarf & Average.

 

#include <stdio.h>
void main()
{
    float height;
 
    printf("Enter  the Height (in centimetres) \n");
    scanf("%f", &height);
    if (height < 150.0)
        printf("Dwarf \n");
    else if ((height >= 150.0) && (height <= 165.0))
        printf(" Average Height \n");
    else if ((height >= 165.0) && (height <= 195.0))
        printf("Taller \n");
    else
        printf("Abnormal height \n");
}

 

Comments

Popular posts from this blog

C Program to Display the ATM Transaction

Java programming language

Python Program to Print all Prime Numbers in an Interval