This is the question:
Given the temperature conversion formulas from Celsius scale to other scales are as follows:
reamur : 4/5*celcius
fahrenheit : 9/5*celcius + 32
Kelvin : celcius + 273
Make a function that accepts input values of temperature on Celsius scale (real type) and input type desired temperature conversion result (type character) and perform calculations based on the input temperature conversion and display the results.
One of the major problems i see is that you used >> instead of << for display. So basically just replace all the ones after cout.
It seems from your homework that you also need to ask the user for an input to display which conversion they want. You might want to look into switch case or if, else if statements.
Sorry! May someone please tell me what is the #include <iomanip> is used for in here?
Because when I copied this code in VS2010 and deleted that part, nothing changed.
Thank you! @marvin77 sorry if I asked it in your topic.
#include <iomanip> lets us manipulate our text before sending it to cout. You can put things into scientific notation, display hexidecimal numbers, set column widths for tables, etc.
In the code above, nothing is used from iomanip and it can be removed from the code.
but my teacher told me to use 2 main, i'm now studying the 2 main function... i really can't understand how must i make that program, please help me --"
but my teacher told me to use 2 main, i'm now studying the 2 main function... i really can't understand how must i make that program, please help me --"
Are you sure he didn't tell you to use two functions?
at least we must use 2 functions, because i'm studying to use that, if not, i can easily solve it, but when it's use 2 function, i can't understand --"