Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include <stdio.h>
- using namespace std;
- float intocm(float &in)
- {
- in*=2.54;
- return in;
- }
- int main()
- {
- float *val=new float;
- cout<< "Inches to Centimetre Converter"<<endl;
- cout<<"Enter the lenght(in inch):"<<endl;
- cin >> *val;
- cout <<"Converted length(in cm):" << intocm(*val);
- }
- /*
- OUTPUT:
- Inches to Centimetre Converter
- Enter the lenght(in inch):
- 20
- Converted length(in cm):50.8
- */
Add Comment
Please, Sign In to add comment