diff options
| author | Taylor Rogers <[email protected]> | 2022-11-08 09:09:38 -0800 |
|---|---|---|
| committer | Taylor Rogers <[email protected]> | 2022-11-08 09:09:38 -0800 |
| commit | 03c98ea207c17bd091b186b0d3157d0d0c3ca77d (patch) | |
| tree | 0ded13a6b5e5579587a23279bbcd0ea432cdba19 /BlankConsoleLab | |
| parent | Add pseudo-code file (diff) | |
| download | cst116-lab2-taylorrog-03c98ea207c17bd091b186b0d3157d0d0c3ca77d.tar.xz cst116-lab2-taylorrog-03c98ea207c17bd091b186b0d3157d0d0c3ca77d.zip | |
Formatting changes
Diffstat (limited to 'BlankConsoleLab')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 607525d..2fb223a 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -107,15 +107,19 @@ int main() cout << "Please enter temperature between " << Fmin << " and " << Fmax << " degrees F: "; cin >> TvalF; + cout << endl; + if (TvalF > Fmax) { TvalF = Fmax; cout << "Value set to " << Fmax << "F." << endl; + cout << endl; } else if (TvalF < Fmin) { TvalF = Fmin; cout << "Value set to " << Fmin << "F." << endl; + cout << endl; } FtoCfunc(TvalC); @@ -128,16 +132,20 @@ int main() cout << "Please enter temperature between " << Cmin << " and " << Cmax << " degrees C: "; cin >> TvalC; + + cout << endl; if (TvalC > Cmax) { TvalC = Cmax; cout << "Value set to " << Cmax << "C." << endl; + cout << endl; } else if (TvalC < Cmin) { TvalC = Cmin; cout << "Value set to " << Cmin << "C." << endl; + cout << endl; } CtoFfunc(TvalF); @@ -152,15 +160,19 @@ int main() cin >> Wspeed; + cout << endl; + if (Wspeed > Wmax) { Wspeed = Wmax; cout << "Value set to " << Wmax << "MPH." << endl; + cout << endl; } else if (Wspeed < Wmin) { Wspeed = Wmin; cout << "Value set to " << Wmin << "MPH." << endl; + cout << endl; } @@ -168,9 +180,9 @@ int main() cout << endl; - cout << setw(20) << "Temp in C" << setw(20) << "Temp in F" << setw(20) << "Wind Speed" << setw(20) << "Wind Chill" << endl; + cout << setw(25) << "Temp (C)" << setw(25) << "Temp (F)" << setw(25) << "Wind Speed (MPH)" << setw(25) << "Wind Chill" << endl; - cout << setw(20) << TvalC << setw(20) << TvalF << setw(20) << Wspeed << setw(20) << Wchill << endl; + cout << setw(25) << TvalC << setw(25) << TvalF << setw(25) << Wspeed << setw(25) << Wchill << endl; cout << endl; |