#include<iostream.h>
#include<conio.h>
class TEMP
{
float f,c;
public:
float getdata();
void display(void);
};
float TEMP :: getdata()
{
cout<<"Enter Value for farenheit degree to find for celsius:- ";
cin>>f;
c = (f-32)/1.8;
return(c);
}
void TEMP :: display(void)
{
float v;
v=getdata();
cout<<"CELSIUS DEGREE = "<<v;
}
void main()
{
TEMP c;
c.display();
}
#include<conio.h>
class TEMP
{
float f,c;
public:
float getdata();
void display(void);
};
float TEMP :: getdata()
{
cout<<"Enter Value for farenheit degree to find for celsius:- ";
cin>>f;
c = (f-32)/1.8;
return(c);
}
void TEMP :: display(void)
{
float v;
v=getdata();
cout<<"CELSIUS DEGREE = "<<v;
}
void main()
{
TEMP c;
c.display();
}
0 comments:
Post a Comment