#include<iostream>
using namespace std;
class temp
{
float feren,celc;
public:
void data()
{
cout<<"Enter Temp in fahrenheit:";
cin>>feren;
}
void convert()
{
celc=(0.56)*(feren-32);
cout<<"Temp in celsius is:"<<celc;
}
};
int main()
{
temp t;
t.data();
t.convert();
return 0;
}
using namespace std;
class temp
{
float feren,celc;
public:
void data()
{
cout<<"Enter Temp in fahrenheit:";
cin>>feren;
}
void convert()
{
celc=(0.56)*(feren-32);
cout<<"Temp in celsius is:"<<celc;
}
};
int main()
{
temp t;
t.data();
t.convert();
return 0;
}
No comments:
Post a Comment