summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/CST116-Lab2-Chambers.cpp
diff options
context:
space:
mode:
authorTheOtherTonyStark <[email protected]>2022-11-07 19:44:03 -0800
committerTheOtherTonyStark <[email protected]>2022-11-07 19:44:03 -0800
commit19926692fac1b90fc3afadc87bd192e83070aeeb (patch)
treefe58541ba5e9a3ff06fece4732748488b5da5272 /BlankConsoleLab/CST116-Lab2-Chambers.cpp
parentSetting up GitHub Classroom Feedback (diff)
downloadcst116-lab2-theothertonystark-master.tar.xz
cst116-lab2-theothertonystark-master.zip
First CommitHEADmaster
Diffstat (limited to 'BlankConsoleLab/CST116-Lab2-Chambers.cpp')
-rw-r--r--BlankConsoleLab/CST116-Lab2-Chambers.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/BlankConsoleLab/CST116-Lab2-Chambers.cpp b/BlankConsoleLab/CST116-Lab2-Chambers.cpp
new file mode 100644
index 0000000..aed2e7e
--- /dev/null
+++ b/BlankConsoleLab/CST116-Lab2-Chambers.cpp
@@ -0,0 +1,29 @@
+
+#include <iostream>
+
+using namespace std;
+
+using std::cout;
+using std::cin;
+using std::endl;
+
+int main()
+{
+ float Giventemp, C, F, celsius, fahrenheit;
+
+
+ cout << "Will your temperature be in celsius(C) or fahrenheit(F)?";
+ cin >> Giventemp;
+
+ if (Giventemp = C)
+ {
+ cout << "Please enter a temperature: ";
+ cin >> celsius;
+ }
+ if (Giventemp = F)
+ {
+ cout << "Please enter a temperature: ";
+ cin >> fahrenheit;
+ }
+}
+