aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab2/5.4_1_Schroeder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST116F2021-Lab2/5.4_1_Schroeder.cpp')
-rw-r--r--CST116F2021-Lab2/5.4_1_Schroeder.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/CST116F2021-Lab2/5.4_1_Schroeder.cpp b/CST116F2021-Lab2/5.4_1_Schroeder.cpp
new file mode 100644
index 0000000..73020ca
--- /dev/null
+++ b/CST116F2021-Lab2/5.4_1_Schroeder.cpp
@@ -0,0 +1,25 @@
+// 5.4_1_Schroeder.cpp : This file contains the 'main' function. Program execution begins and ends there.
+//
+
+#include <iostream>
+#include <iomanip>
+using namespace std;
+using std::setprecision;
+using std::ios;
+
+
+
+int main()
+{
+ float temp = 0.0F;
+ cout << "What is your temperature?\n";
+ cin >> temp;
+
+ cout << "Your temp is:";
+ cout.width(6);
+ cout.setf(ios::fixed);
+ cout << setprecision(1) << temp;
+
+ return 0;
+
+}