From 03c98ea207c17bd091b186b0d3157d0d0c3ca77d Mon Sep 17 00:00:00 2001 From: Taylor Rogers Date: Tue, 8 Nov 2022 09:09:38 -0800 Subject: Formatting changes --- BlankConsoleLab/BlankConsoleLab.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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; -- cgit v1.2.3