I am doing the Temperture Converter problem on this site: Temperature Converter Programming Challenge - Cprogramming.com
I basically did a quick program and used the example numbers giving on the above site (10 for low, 20 high, 4 for the step). I am getting the "right answers" but they are intergers and have no decimal places but 2 of the answers should have decimal places. I declared the varibles with double and tried with float but I am getting the same answer. When I input (10.2 for low, 20 for high, 4 for step) all the answers come out with a .2 at the end so I know it can print decimal places.
Am I missing something here? like do I have to declare how many decimal places somewhere?
Here is my program below.
using namespace std;
void Celsius_to_Fahrenheit(double celsius_low, double celsius_high, int step);
double low_limit, high_limit;
cout<<"Enter low Celcius ";
cout<<"\nEnter high Celcius ";
cout<<"\nEnter the ingrements you would like it to calculate by ";
Celsius_to_Fahrenheit(low_limit, high_limit, increments);
cout<<"Press any key then enter to exit";
void Celsius_to_Fahrenheit(double celsius_low, double celsius_high, int step)
while(celsius_high >= celsius_low)
Fahrenheit = 9/5 * (celsius_low + 32);
celsius_low = celsius_low + step;