From 350eeafbe6fb816a16e92dba4300943be5c2b604 Mon Sep 17 00:00:00 2001 From: fdai7514 Date: Fri, 10 Feb 2023 21:14:26 +0100 Subject: [PATCH] refactoring: change variable names and format code in calculatorSquare.c --- src/calculatorSquare.c | 6 +++++- src/calculatorSquare.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calculatorSquare.c b/src/calculatorSquare.c index bca42f6..a58fe24 100644 --- a/src/calculatorSquare.c +++ b/src/calculatorSquare.c @@ -1,2 +1,6 @@ #include "calculatorSquare.h" -float calculatorSquare(float x){return x*x;} + +float calculatorSquare(float num) +{ + return num*num; +} diff --git a/src/calculatorSquare.h b/src/calculatorSquare.h index bbc1bb5..7f0efea 100644 --- a/src/calculatorSquare.h +++ b/src/calculatorSquare.h @@ -2,7 +2,7 @@ #define CALCULATORSQUARE_H #include #include -float calculatorSquare(float x); +float calculatorSquare(float num); #endif // CALCULATORSQUARE_H