实验
#include<iostream>
using namespace std;
class change{
public:
float intput1(float c);
float intput2(float &c);
void output();
private:
float c;
};
float change::intput1(float C)
{ c=(5.0/9)*(C-56);
return c;}
float change::intput2(float &C)
{ c=(5.0/9)*(C-56);
return c;}
void change::output()
{ cout<<c;}
int main()
{
float C=90;
class change st1,st2;
st1.intput1(C),st1.output(),cout<<C<<endl;
st1.intput1(C),st1.output(),cout<<C<<endl;
cin>>C;
st2.intput2(C),st2.output(),cout<<C<<endl;
st2.intput2(C),st2.output(),cout<<C<<endl;
return 0;
}