summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/Project2-Apetroaei.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'BlankConsoleLab/Project2-Apetroaei.cpp')
-rw-r--r--BlankConsoleLab/Project2-Apetroaei.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/BlankConsoleLab/Project2-Apetroaei.cpp b/BlankConsoleLab/Project2-Apetroaei.cpp
new file mode 100644
index 0000000..ef526e3
--- /dev/null
+++ b/BlankConsoleLab/Project2-Apetroaei.cpp
@@ -0,0 +1,49 @@
+// Lab 2 Alexandra Apetroaei (CST 116)
+
+#include <iostream>
+#include <iomanip>
+#include <cmath>
+
+using namespace std;
+using std::cout;
+using std::cin;
+using std::string;
+using std::endl;
+
+int float fahr;
+int float cel;
+int float mph;
+
+char input;
+char menu;
+
+int main()
+{
+ //ask user to choose temperature calculations
+ cout << "Do you want to enter temperature in Farenheit? or Celcius?" << endl;
+ cout << "Options: Farenheit (f) Celcius (c)." << endl;
+
+ //converter to use
+ cin >> input;
+
+ //if user types f, using farenheit
+ if (input == 'f')
+ {
+ // ask user to input temperature
+ cout << "Please enter temperature in Farenheit:" << endl;
+ cin >> fahr;
+
+ //Display result of calculation
+ }
+ //if user types c, using celcius
+ else if (input == 'c')
+ {
+ cout << "Please enter temperature in Celcius:" << endl;
+ cin >> cel;
+
+ fahr = ((cel * 9.0 / 5.0) + 32.0);
+
+ }
+
+ return 0;
+} \ No newline at end of file