#include<iostream.h>
#include<conio.h>
class temp
{
public:
float gett()
{
float f;
cout<<"Enter the temparature in farhenheit";
cin>>f;
return f;
}
float calc(float)
{
float c,f;
c=(f-32)*5/9.0;
return c;
}
void display(float)
{
int c;
cout<<"\n Temparature in centigrade is:"<<c;
}
};
int main()
{
float c,f;
temp t;
t.gett();
t.calc(f);
t.display(c);
return 0;
}
No comments:
Post a Comment