Is there a way to allow the user to enter a value to increment between lines?
Here is my code:
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
double Tempconversion(double Tc);
int main()
{double Tc, Tf(0);
cout << "Enter a starting temperature for Celcius: ";
cout << fixed;
cin >> Tc;
cout << " \n Celcius Farenheit" << endl;
for (double celcius=0; celcius<=19; celcius++)
{
cout << setw(8) << setprecision(4) << Tc <<
setw(18) << setprecision(4) << Tempconversion(Tc) << endl;
Tc+=5;
}}
double Tempconversion(double Tc)
{double Tf;
Tf = (9/5 * Tc) + 32;
return Tf;
}
Is there a way to allow the user to enter a value for Tc+=5?
I have it!
Thanks for the help!