summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/cst116-lab2-stark.cpp
diff options
context:
space:
mode:
authorTrenton Stark <[email protected]>2022-11-05 12:38:47 -0700
committerTrenton Stark <[email protected]>2022-11-05 12:38:47 -0700
commit90fba84d71f63f46ebadf25afffe01d385d09f14 (patch)
tree876466bc38b7366e3a5c7de5d8c9a6b757459701 /BlankConsoleLab/cst116-lab2-stark.cpp
parentAdded wind chill calculation. (diff)
downloadcst116-lab2-stark-90fba84d71f63f46ebadf25afffe01d385d09f14.tar.xz
cst116-lab2-stark-90fba84d71f63f46ebadf25afffe01d385d09f14.zip
Added output.
Diffstat (limited to 'BlankConsoleLab/cst116-lab2-stark.cpp')
-rw-r--r--BlankConsoleLab/cst116-lab2-stark.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/BlankConsoleLab/cst116-lab2-stark.cpp b/BlankConsoleLab/cst116-lab2-stark.cpp
index b8383e7..3f7d716 100644
--- a/BlankConsoleLab/cst116-lab2-stark.cpp
+++ b/BlankConsoleLab/cst116-lab2-stark.cpp
@@ -3,11 +3,13 @@
// Lab 2
#include <iostream>
+#include <iomanip>
#include <cmath>
using std::cout;
using std::cin;
using std::endl;
+using std::setw;
void inputTemp(float& cTemp, float& fTemp);
float tempConverter(float temp, bool dirc);
@@ -25,10 +27,9 @@ int main() {
inputWind(windS);
windC = windChillCalc(fTemp, windS);
- cout << cTemp << endl;
- cout << fTemp << endl;
- cout << windS << endl;
- cout << windC << endl;
+ cout << "Calculations complete:" << endl;
+ cout << setw(15) << "Celcius" << setw(15) << "Fahrenheit" << setw(15) << "Wind Speed" << setw(15) << "Wind Chill" << endl;
+ cout << setw(15) << cTemp << setw(15) << fTemp << setw(15) << windS << setw(15) << windC << endl;
}
//Takes either celcius or fahrenheit then converts it to the other and outputs both by reference