summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[email protected] <[email protected]>2022-11-09 14:27:44 -0800
committer[email protected] <[email protected]>2022-11-09 14:27:44 -0800
commit5b1b297815f5d88e1ed594af7c1e7e3d4bc8f83a (patch)
treeb826548ee1d5a59ecf83b263b533bf4fa4b7e773
parentSetting up GitHub Classroom Feedback (diff)
downloadcst116-lab2-smith-benjamin-5b1b297815f5d88e1ed594af7c1e7e3d4bc8f83a.tar.xz
cst116-lab2-smith-benjamin-5b1b297815f5d88e1ed594af7c1e7e3d4bc8f83a.zip
Initial Inputs
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp23
-rw-r--r--BlankConsoleLab/BlankConsoleLab.vcxproj8
2 files changed, 20 insertions, 11 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
diff --git a/BlankConsoleLab/BlankConsoleLab.vcxproj b/BlankConsoleLab/BlankConsoleLab.vcxproj
index db2e734..d2e3ee2 100644
--- a/BlankConsoleLab/BlankConsoleLab.vcxproj
+++ b/BlankConsoleLab/BlankConsoleLab.vcxproj
@@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>