diff options
Diffstat (limited to 'InClassExercise5/InClassExercise5/Source.cpp')
| -rw-r--r-- | InClassExercise5/InClassExercise5/Source.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/InClassExercise5/InClassExercise5/Source.cpp b/InClassExercise5/InClassExercise5/Source.cpp index 659be0f..fb42860 100644 --- a/InClassExercise5/InClassExercise5/Source.cpp +++ b/InClassExercise5/InClassExercise5/Source.cpp @@ -5,7 +5,7 @@ #include <iostream> -#include "helpers.h" +#include "Header.h" int main() @@ -50,7 +50,7 @@ float percentage(int a, int b) { } float FtoC(int fah) { - // -32*5/9 + float num = (fah - 32) * (5.0 / 9.0); @@ -58,7 +58,7 @@ float FtoC(int fah) { } float CtoF(int cel) { - // 9/5+32 + float num = (cel * (9.0 / 5.0)) + 32; @@ -68,6 +68,7 @@ float CtoF(int cel) { long factorial(int a) { if (a == 0 || a == 1) + return 1; else return a * factorial(a - 1); |