aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk1/hw1_directory/strap012_1B.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ee1301/wk1/hw1_directory/strap012_1B.cpp')
-rw-r--r--ee1301/wk1/hw1_directory/strap012_1B.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/ee1301/wk1/hw1_directory/strap012_1B.cpp b/ee1301/wk1/hw1_directory/strap012_1B.cpp
index e69de29..472f96d 100644
--- a/ee1301/wk1/hw1_directory/strap012_1B.cpp
+++ b/ee1301/wk1/hw1_directory/strap012_1B.cpp
@@ -0,0 +1,19 @@
+#include <iostream>
+#include <string>
+using namespace std;
+
+int main()
+{
+ string option;
+ cout << "Are input components int or float (i/f)? ";
+ cin >> option;
+
+ if (option == "i") {
+ cout << "E";
+ }else{ if (option == "f") {
+ cout << "e";
+ }else{
+ cout << "nah.";
+ }
+ }
+} \ No newline at end of file