#include<iostream.h>
using namespace std;
class gallon
{
float g;
public:
void data()
{
cout<<"\nEnter number of gallon:";
cin>>g;
}
void feet()
{
cout<<"\nEquivalent cubic feet is:"<<g/7.481;
}
};
int main()
{
gallon ans;
ans.data();
ans.feet();
return 0;
}
using namespace std;
class gallon
{
float g;
public:
void data()
{
cout<<"\nEnter number of gallon:";
cin>>g;
}
void feet()
{
cout<<"\nEquivalent cubic feet is:"<<g/7.481;
}
};
int main()
{
gallon ans;
ans.data();
ans.feet();
return 0;
}
No comments:
Post a Comment