Write a C program to print weight and height of a person using typedef.
#include <stdio.h>
int main()
{
typedef float f;
f height, weight;
printf("Enter your height: ");
scanf("%f",&height);
printf("Enter your weight: ");
scanf("%f",&weight);
printf("Height is: %f",height);
printf("\nWeight is: %f",weight);
return 0;
}
Comments
Leave a comment