From 446425038559e86f5fe73d241e2dccd352aa8f65 Mon Sep 17 00:00:00 2001 From: Asahel Date: Sat, 27 Jan 2024 11:29:05 -0800 Subject: Fixed error on line 8 --- InClassExercise5/InClassExercise5/Source.cpp | 7 ++++--- 1 file 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 -#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); -- cgit v1.2.3