Answer to Question #300579 in C for Suvedhaa

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

1
Expert's answer
2022-02-21T11:04:35-0500
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS