
Bagaimana membuat kalkulasi Temperatur Suhu menggunakan C++, baik langsung saja ini dia source codenya, dengan metode ConstructorDestructor
#include
#include
class suhu
{ int *c, *f, *r;
public :
suhu (int,int,int);
~suhu ();
int fahrent (void) {return ((*c * 1.8) + 32);}
int reamour (void) {return (*c * 0.8);}
int refah (void) {return ((*r * 2.25) + 32);}
int fahcel (void) {return ((*f / 1.8) - 32);}
};
suhu::suhu (int g, int h, int i){
c = new int;
f = new int;
r = new int;
*c = g;
*f = h;
*r = i;
}
suhu::~suhu (){
delete c;
delete f;
delete r;
}
int main(){
int...