C++ program that takes height in centimeters and then converts heights to feet and inches.

Q19. Write a short program that asks for your height in centimeters and then converts your heights to feet and inches. (1 foot = 12 inches, 1 inch = 2.54 cm).

Ans.       

#include<iostream.h>

#include<conio.h>   //for clrscr();

void main()

{

float cm, foot, inch;

clrscr();

cout<<“\n Enter your height in cm: “;

cin>>cm; Read More …