aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab2
diff options
context:
space:
mode:
authorBensProgramma <[email protected]>2021-10-12 17:45:32 -0700
committerGitHub <[email protected]>2021-10-12 17:45:32 -0700
commit10215ecf3c7afe5d795ec1b9d5eb138607c9ed21 (patch)
tree5bff6dd1be0e1ad0fcc60b6a431658e60daeeef9 /CST116F2021-Lab2
parentAdd online IDE url (diff)
downloadcst116-lab2-bensprogramma-10215ecf3c7afe5d795ec1b9d5eb138607c9ed21.tar.xz
cst116-lab2-bensprogramma-10215ecf3c7afe5d795ec1b9d5eb138607c9ed21.zip
Lab2_5.4_1_Schroeder
Diffstat (limited to 'CST116F2021-Lab2')
-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;
+
+}