summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp23
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