Question #300579

Write a C program to print weight and height of a person using typedef.


Input : Weight: 50.5


Height: 7.2


Output : Weight: 50.5


Height: 7.2

Expert's answer

#include <stdio.h>  
int main()  
{  
	typedef float typedefFloat;  
	typedefFloat height, weight;




	printf("Enter your weight: ");
	scanf("%f",&weight);    
	printf("Enter your height: ");
	scanf("%f",&height);




	printf("Weight is: %.1f",weight);    
	printf("\nHeight is: %.1f",height);  








	scanf("%f",&height);
	return 0;  
} 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS