Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

C program determines the height status for heights in cm

#include <stdio.h>
void main() 
{
	float ht;
	printf("Enter the Height (in centimetres)
");
	scanf("%f",&ht);
	if(ht < 150.0)
		printf("Dwarf
"); 
    else if((ht>=150.0) && (ht<=165.0))
    	printf(" Average Height
"); 
    else if((ht>=165.0) && (ht <= 195.0))
		  printf("Taller
"); 
    else
		  printf("Abnormal height
");
}
/* End of main() */
Source by scanftree.com #
 
PREVIOUS NEXT
Tagged: #C #program #determines #height #status #heights #cm
ADD COMMENT
Topic
Name
8+2 =