diff options
| author | rPatrickWarner <[email protected]> | 2024-01-22 19:29:25 -0800 |
|---|---|---|
| committer | rPatrickWarner <[email protected]> | 2024-01-22 19:29:25 -0800 |
| commit | 771bdbb704d210a45875d8b4d2b011c08ec70297 (patch) | |
| tree | db20c98ca98496b929cd44838fd66271c24b5b7e /InClassExercise5ReeceW | |
| parent | inclassexercise5 (diff) | |
| download | in-class-exercise-5-reecepwarner-771bdbb704d210a45875d8b4d2b011c08ec70297.tar.xz in-class-exercise-5-reecepwarner-771bdbb704d210a45875d8b4d2b011c08ec70297.zip | |
Diffstat (limited to 'InClassExercise5ReeceW')
| -rw-r--r-- | InClassExercise5ReeceW/InClassExercise5ReeceW/IC5Header.h | 3 | ||||
| -rw-r--r-- | InClassExercise5ReeceW/InClassExercise5ReeceW/Source.cpp | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/InClassExercise5ReeceW/InClassExercise5ReeceW/IC5Header.h b/InClassExercise5ReeceW/InClassExercise5ReeceW/IC5Header.h index 5d9ed1b..ef5b5f7 100644 --- a/InClassExercise5ReeceW/InClassExercise5ReeceW/IC5Header.h +++ b/InClassExercise5ReeceW/InClassExercise5ReeceW/IC5Header.h @@ -5,6 +5,9 @@ int returnInt(); int sum(int a, int b); + +int sum(int a, int b, int c, int d); + float percentage(int a, int b); float fToc(int fah); diff --git a/InClassExercise5ReeceW/InClassExercise5ReeceW/Source.cpp b/InClassExercise5ReeceW/InClassExercise5ReeceW/Source.cpp index c757bcf..8f5a1b5 100644 --- a/InClassExercise5ReeceW/InClassExercise5ReeceW/Source.cpp +++ b/InClassExercise5ReeceW/InClassExercise5ReeceW/Source.cpp @@ -59,7 +59,7 @@ float percentage(int a, int b) float fToc(int fah) { - float numb = (fah - 32) * (5 / 9); + float numb = (fah - 32) * (5.0 / 9); return numb; } @@ -68,7 +68,13 @@ float cTof(int cel) { float num = (cel * (9.0 / 5)) + 32; - return num; } + +int sum(int a, int b, int c, int d) +{ + int add = a + b + c + d; + + return add; +}
\ No newline at end of file |