₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,347,134 members, 8,526,813 topics. Date: Sunday, 29 November 2026 at 01:33 PM

Toggle theme

Please Help Me Solve This C++ Question - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Please Help Me Solve This C++ Question (1648 Views)

1 Reply (Go Down)

Please Help Me Solve This C++ Question by Oladg2(op): 1:54pm On Feb 22, 2015
write a program which inputs reading expressed in fahrenheit and output its equivalent in celcius using the formular °c=5/9(℉-32). andvcompile and run the program. its behaviour should resemble this : Temperature in fahrenheit =41
41 degree fahrenheit =5 degree celsius.
Re: Please Help Me Solve This C++ Question by xreal: 2:00pm On Feb 22, 2015
Sorry pls.
I can't right now.

CHANGE on my mind.
Re: Please Help Me Solve This C++ Question by codemarshal08(m): 2:13pm On Feb 22, 2015
Oladg2:
write a program which inputs reading expressed in fahrenheit and output its equivalent in celcius using the formular °c=5/9(℉-32). andvcompile and run the program. its behaviour should resemble this : Temperature in fahrenheit =41
41 degree fahrenheit =5 degree celsius.
wat code have u tried ? are u a programmer . Please give details
Re: Please Help Me Solve This C++ Question by codemarshal08(m): 2:43pm On Feb 22, 2015
if u would prefer already made , take this:

#include <iostream>
using namespace std;
int main()
{
double fahrenheit;
double celcius;

cout << "\t Enter temperature Value in Fahrenheit " << endl;
cin >> fahrenheit;

// using the formula u gave c=5/9(℉-32)
celcius = (5/9.0) * (fahrenheit - 32); // note d .0 stuff to avoid integer division

cout << "\t Temperature in fahrenheit = " << fahrenheit << endl;
cout << "\t " << fahrenheit << " degree fahrenheit = " << celcius << " degree in celcius " << endl;

return 0;
}
Re: Please Help Me Solve This C++ Question by BlueMagnificent(m): 2:48pm On Feb 22, 2015
Oladg2:
write a program which inputs reading expressed in fahrenheit and output its equivalent in celcius using the formular °c=5/9(℉-32). andvcompile and run the program. its behaviour should resemble this : Temperature in fahrenheit =41
41 degree fahrenheit =5 degree celsius.
You would help ur self better if you could have at least provided an algorithm of how u intend to solve the problem. It will make u a better programmer with time smiley

codemarshal's code (no pun intended ) would do the trick
Re: Please Help Me Solve This C++ Question by nakaofficial(m): 4:34pm On Feb 22, 2015
/ / using function approach
#include <iostream>
using namespace std;

float temp(float f) {
float c = (5.0/9.0)*(f-32);
return (c);
}

int main()
{
cout << "Enter temperature in Fahrenheit:";
cin >> f;
cout << f << "Degree Fahrenheit =" << temp(f) << "Degree Celsius";
return 0;
}
Re: Please Help Me Solve This C++ Question by trytillmake(m): 9:22am On Feb 24, 2015
Instead of giving u fish let me show u how to fish and catch many fish for yrself, download this book [url=http://en.bookfi.org/s/?q=Learn+to+Program+with+C%2B%2B&t=0]here[/url] "Learn to Program with C++ by Prof. John Smiley" easiest book u can read in learning c++ and programming and wen u are done u solve any kind of problem yrself.
1 Reply

Someone Should Help Me Solve This C++ Question Please • Help! Im Stuck With This C# Program • Programmer Should Please Help Me To Solve This C++ Questions • 2 • 3 • 4

Does Anyone Know Itex Integrated Services In VI • Mysql Or SQL Which Is The Best To Learn • How Do You Pay For Play Console With $20 Limit