aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab2/5.4_1_Schroeder.cpp
blob: 73020caa6868abe835002c86a7fc74a3e39988d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;

}