Saved Bookmarks
| 1. |
Write a program to read your height in meter and cm convert it into Feet and inches |
|
Answer» #include<iostream> using namespace std; int main( ) { int m,cm; float inch; int feet; cout<<“Enter your height in Centimeter:”; cin>>cm; cout<<” Your height is “<<cm/100<<” Meters and “<<cm%100<<"cm\n"; inch=cm/2.54; feet=inch/12; inch=(int)inch%12; cout<<feet<<"feet and"<<inch<<"inch"; } |
|