From 10215ecf3c7afe5d795ec1b9d5eb138607c9ed21 Mon Sep 17 00:00:00 2001 From: BensProgramma <91996773+BensProgramma@users.noreply.github.com> Date: Tue, 12 Oct 2021 17:45:32 -0700 Subject: Lab2_5.4_1_Schroeder --- CST116F2021-Lab2/5.4_1_Schroeder.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 CST116F2021-Lab2/5.4_1_Schroeder.cpp 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 +#include +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; + +} -- cgit v1.2.3