#include <iostream>
using namespace std;
class InchtoCentimeter
{
float Inch, Centimeter ;
public:
void GetInch();
void Conversion();
void print();
};
void InchtoCentimeter::GetInch()
{
cout << endl << "Enter inch:" ;
cin >> Inch ;
}
void InchtoCentimeter::Conversion()
{
Centimeter = 2.54*Inch ;
}
void InchtoCentimeter::print()
{
cout << endl << "Inch=" << Inch << endl << "Centimeter=" << Centimeter << endl ;
}
int main()
{
InchtoCentimeter d;
d.GetInch();
d.Conversion();
d.print();
return 0;
}
C and C++ programs, games, softwares. Easy programming guide. Learn to code and enjoy coding in CoderNepal
Home » Inch to Centimeter
Inch to Centimeter
This is the solution to convert Inch into Centimeter
Subscribe to:
Comments (Atom)
No comments:
Post a Comment