#include<iostream>
using namespace std;
class konversi{
friend ostream& operator << (ostream&, konversi&);
friend istream& operator >> (istream&, konversi&);
private:
float c,r,f;
public:
konversi(){
c = 0;
r = 0;
f = 0;
}
float reamur(){
r = (4/(float)5) * c;
return r;
}
float fahrenheit(){
f = (9/(float)5) * c + 32;
return f;
}
};
ostream& operator << (ostream& out, konversi& kon){
out << "c = : "<<kon.c<<endl;
out <<"suhu reamur adalah "<<kon.reamur()<<endl;
out <<"suhu fahrenheit adalah "<<kon.fahrenheit()<<endl;
}
istream& operator >> (istream& in, konversi& ko){
cout << "Masukkan c = ";
in >> ko.c;
return in;
}
int main(){
konversi s;
cin>>s;
cout<<s;
return 0;
}
using namespace std;
class konversi{
friend ostream& operator << (ostream&, konversi&);
friend istream& operator >> (istream&, konversi&);
private:
float c,r,f;
public:
konversi(){
c = 0;
r = 0;
f = 0;
}
float reamur(){
r = (4/(float)5) * c;
return r;
}
float fahrenheit(){
f = (9/(float)5) * c + 32;
return f;
}
};
ostream& operator << (ostream& out, konversi& kon){
out << "c = : "<<kon.c<<endl;
out <<"suhu reamur adalah "<<kon.reamur()<<endl;
out <<"suhu fahrenheit adalah "<<kon.fahrenheit()<<endl;
}
istream& operator >> (istream& in, konversi& ko){
cout << "Masukkan c = ";
in >> ko.c;
return in;
}
int main(){
konversi s;
cin>>s;
cout<<s;
return 0;
}