summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/CST116-Lab1-Fine.cpp
diff options
context:
space:
mode:
authorEdwardFine <[email protected]>2022-10-06 15:07:01 -0700
committerEdwardFine <[email protected]>2022-10-06 15:07:01 -0700
commit54977eb4b4cdad932ddccc97877baed7af85f5cc (patch)
tree0c3d3b397296279ad5b253a36404e142544b09eb /BlankConsoleLab/CST116-Lab1-Fine.cpp
parentPrint inputted values and loops until inputted right. (diff)
downloadcst116-lab1-edwardfine-54977eb4b4cdad932ddccc97877baed7af85f5cc.tar.xz
cst116-lab1-edwardfine-54977eb4b4cdad932ddccc97877baed7af85f5cc.zip
Area of a Kite
Diffstat (limited to 'BlankConsoleLab/CST116-Lab1-Fine.cpp')
-rw-r--r--BlankConsoleLab/CST116-Lab1-Fine.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/BlankConsoleLab/CST116-Lab1-Fine.cpp b/BlankConsoleLab/CST116-Lab1-Fine.cpp
index bf098cb..11dfaad 100644
--- a/BlankConsoleLab/CST116-Lab1-Fine.cpp
+++ b/BlankConsoleLab/CST116-Lab1-Fine.cpp
@@ -5,6 +5,8 @@
using namespace std;
+int GetArea(int length, int width);
+
using std::cout;
using std::cin;
using std::endl;
@@ -14,6 +16,7 @@ int main()
int length;
int width;
int correct = 0;
+ float area;
while (correct == 0) {
cout << "How long is your kite in centimeters? ";
cin >> length;
@@ -21,8 +24,11 @@ int main()
cin >> width;
cout << endl << "Your kite is " << length << "cm long and " << width << "cm wide? 1=Yes/ 0=No ";
cin >> correct;
- endl;
+ cout << endl;
}
+ area = (length * width) / 2.0;
+
}
+