This is my code and i dont know what i did wrong.
When I run it; It ask for a number the it says the result is celcius.
If any one can please do. Feel free to try the code your self
[html]
[body]
[tag]
[/body]Code:// // Conversion - Program to convert temperature from // Fahrenheit degreees into Celcius: // Fahrenheit = Celcius 9/5 + 32 = // #include <cstdio> #include <cstdlib> #include <iostream> using namespace std;int main (int nNumberofargs, char* pszArgs [] ) { // enter the tempature in Fahrenheit int Fahrenheit; cout << "Enter the tepature in Fahrenheit:"; cin >> Fahrenheit; // Use conversion factor for Fahrenheit // to Celcius int factor; factor = 5 + 32 ; // use conversion factor to convert Fahrenheit // into Celcius values int fahrenheit; fahrenheit = factor * Fahrenheit/5+32; // output the results (followed "by a Newline) cout << "Celcius value is:" ; cout >> celcius << endl; // wait until user is read before terminating program // to allow the user see the program results system("PAUSE"); return 0; } [/tag]
[/html]



LinkBack URL
About LinkBacks


