Menu Close

Compute the height from feet and inches to centimetres.

Salima saw a pair of beautiful dress online but she was confused about the metric system used for the size of the dress. It was given in feet and inches, even in some countries that primarily use some other metric system.


As Salima knows a little bit of programming she thought of creating a program that gets number of feet and inches  and compute the height of the customer in centimetres.

Functional Description: 
One foot is 12 inches. 
One inch is 2.54 centimeters.

Input:
Only line of input has two numbers of type integer representing the feet and inches separated by a space

Output:
Print the Height of the customer in centimetres
#include <stdio.h>
int main()
{
int feet,inches;
float cms;
scanf("%d %d",&feet,&inches);
cms=feet*12*2.54+inches*2.54;
printf("Your height in centimetres is : %.2f",cms);
    return 0;
}

INPUT_1:
 5  5

OUTPUT:
Your height in centimetres is  :  165.10


INPUT_2:
 7  6

OUTPUT:
Your height in centimetres is : 228.60


INPUT_3:
 7  1

OUTPUT:
Your height in centimetres is : 215.90



Morae Q!