diff options
Diffstat (limited to 'BlankConsoleLab/CST116-Lab2-Chambers.cpp')
| -rw-r--r-- | BlankConsoleLab/CST116-Lab2-Chambers.cpp | 29 |
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; + } +} + |