#include <stdio.h>
void main()
{
float ht;
printf(“Enter the Height (in centimeters)\n”);
scanf(“%f”,&ht);
if(ht < 150.0)
printf(“Dwarf\n”);
else if((ht>=150.0) && (ht<=165.0))
printf(” Average Height\n”);
else if((ht>=165.0) && (ht <= 195.0))
printf(“Taller\n”);
else
printf(“Abnormal height\n”);
} /* End of main() */
/*———————————–
Output
Enter the Height (in centimeters)
45
Dwarf
—————————————-*/
Not Satisfied ? Just search & get the result
Related posts:
- C program to accept a list of data items and find the second largest and second smallest elements in it. And also computer the average of both. And search for the average value whether it is present in the array or not. Display appropriate message on successful search.
- C program to read in four integer numbers into an array and find the average of largest two of the given numbers without sorting the array. The program should output the given four numbers and the average with suitable headings.
- C program to accept a set of numbers and compute mean, variance and standard deviation
- C program to read N integers (zero, +ve and -ve) into an array A and to a) Find the sum of negative numbers b) Find the sum of positive numbers and c) Find the average of all input numbers Output the various results computed with proper headings
- C Program to accept two matrices and check if they are equal

{ 10 trackbacks }