Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,193,324 members, 7,950,637 topics. Date: Monday, 16 September 2024 at 06:17 PM |
Nairaland Forum / Science/Technology / Programming / Please Help Me Solve This C++ Question (1561 Views)
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)
Please Help Me Solve This C++ Question by Oladg2: 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: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: 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 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)
Cloud Computing / xxxxxxxxxxxxx / Can A Pro Programmer/developer Answer This Question?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |