#include<iostream>
using namespace std;
class dist
{
private:
int feet;
float inch;
public:
void get()
{
cout<<"enter feets: "<<endl;
cin>>feet;
cout<<"enter inches: "<<endl;
cin>>inch;
}
void print()
{
cout<<"you entered: "<<endl;
cout<<"feets = "<<feet<<endl;
cout<<"and"<<endl;
cout<<"inches = "<<inch;
cout<<endl;
}
};
void main()
{
dist d1;
d1.get();
d1.print();
}
No comments:
Post a Comment