summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
authorMorgan Cyrus <[email protected]>2022-10-17 22:43:37 -0700
committerMorgan Cyrus <[email protected]>2022-10-17 22:43:37 -0700
commit25a86fd5d00ff99943db4bc8aca30c0212b4e945 (patch)
tree877ea765e3a09300208ebc7309a97bccaf43af4b /BlankConsoleLab/BlankConsoleLab.cpp
parentfloat (diff)
downloadcst116-lab1-cyrus-25a86fd5d00ff99943db4bc8aca30c0212b4e945.tar.xz
cst116-lab1-cyrus-25a86fd5d00ff99943db4bc8aca30c0212b4e945.zip
Fixed float
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index ce23632..ed7af6e 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -24,7 +24,7 @@ using std::cout;
using std::cin;
using std::endl;
-float kiteCalc(int wid, int len);
+float kiteCalc(float wid, float len);
int main()
{
@@ -37,7 +37,7 @@ int main()
cout << endl << "Enter value for kite length in cm: ";
cin >> kiteLen;
- cout << "You have entered " << kiteWidth << "cm for kite width, and " << kiteLen << "cm for kite length." << endl;
+ cout << "\nYou have entered " << kiteWidth << "cm for kite width, and " << kiteLen << "cm for kite length." << endl;
kiteArea = kiteCalc(kiteWidth, kiteLen);
cout << "The area of the kite, in square meters, is: " << kiteArea << endl;
@@ -45,7 +45,7 @@ int main()
}
-int kiteCalc(float wid, float len)
+float kiteCalc(float wid, float len)
{
//calculate kite area in cm^2
float kiteAreaCalc = (wid * len)/2;