From 19926692fac1b90fc3afadc87bd192e83070aeeb Mon Sep 17 00:00:00 2001 From: TheOtherTonyStark Date: Mon, 7 Nov 2022 19:44:03 -0800 Subject: First Commit --- BlankConsoleLab/CST116-Lab2-Chambers.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 BlankConsoleLab/CST116-Lab2-Chambers.cpp (limited to 'BlankConsoleLab/CST116-Lab2-Chambers.cpp') 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 + +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; + } +} + -- cgit v1.2.3