diff options
| author | [email protected] <[email protected]> | 2022-11-09 14:27:44 -0800 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2022-11-09 14:27:44 -0800 |
| commit | 5b1b297815f5d88e1ed594af7c1e7e3d4bc8f83a (patch) | |
| tree | b826548ee1d5a59ecf83b263b533bf4fa4b7e773 /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Setting up GitHub Classroom Feedback (diff) | |
| download | cst116-lab2-smith-benjamin-5b1b297815f5d88e1ed594af7c1e7e3d4bc8f83a.tar.xz cst116-lab2-smith-benjamin-5b1b297815f5d88e1ed594af7c1e7e3d4bc8f83a.zip | |
Initial Inputs
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index ed5f807..eee0f79 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -1,16 +1,25 @@ // BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there. -// +/* +* Benjamin Smith +* CST116 Lab 2 +*/ #include <iostream> using namespace std; -using std::cout; -using std::cin; -using std::endl; +string input = ""; +float temperature = 0; int main() { - cout << "Hello World!\n"; -} - + cout << "Before you input a temperature value, you must first determine if it's in fahrendheit or celcius." << endl; + cout << "Please input 'F' for fahrendheit or 'C' for celcius: "; + cin >> input; + while (input != "F" && input != "C") { + cout << "That input is invalid." << endl; + cout << "Make sure your input is capitalized." << endl; + cout << "Please input 'F' for fahrendheit or 'C' for celcius: "; + cin >> input; + } +}
\ No newline at end of file |