The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Hi there I'm not quite sure how to modularize this program and I need the table too look more like a table then it does now.
Â
Temperature Conversions.cpp
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double C,F,K,R,n,i;
cout <<"Enter starting temperature in Celsius: ";
cin >> C;
while (C <= -273.15)
{
cout <<"ERROR: Temp must be >= -273.15: ";
cin >> C;
}
n = n--;
cout << "Enter increments in degrees Celsius: ";
cin >> n;
i= 1; i++;
F= C * 1.8+32;
K= C + 273.15;
R= C * 1.8+32+459.67;
cout <<" #\t Cels\t Fahr\t Kelv\t Rank" <<endl;
cout <<" " << n << setw(4) << " " << C << setw(4) << " " << F
<< setw (6) << " " << K << setw (6) << " " << R << endl;
}