Replies: 1 comment
-
//without call reference
#include <iostream>
using namespace std;
class temprature {
public:
double tempFahrenheit;
double tempCelcius;
void getTemprature() {
cout << "Enter temprature in celcius: ";
cin >> tempCelcius;
}
void convTemp() {
tempFahrenheit = (tempCelcius * 1.8) + 32;
cout << "Temprature in F is " << tempFahrenheit << "F";
}
};
int main() {
temprature t1;
t1.getTemprature();
t1.convTemp();
return 0;
}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Want this problem without function call by reference - Link
Beta Was this translation helpful? Give feedback.
All reactions