Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,673 members, 7,809,568 topics. Date: Friday, 26 April 2024 at 11:18 AM

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

Nairaland Forum / Science/Technology / Programming / Please Help Me Solve This C++ Question (1530 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)

(1) (Reply) (Go Down)

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:
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)

The Kind Of Naija Bank Account Used To Receive Pays From Google Play Store / All The IT Savys In Here I Need Some Advice 911 / [free Game] Keke On The Run 2

(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. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.