Browse Source

Changed the parameter name from operation to operationType in the function performOperation in the programmingMode.c file and also in the calculator.h file

remotes/origin/kabrel
fdai7782 11 months ago
parent
commit
1c4c48654e
  1. 2
      src/main/c/calculator.h
  2. 4
      src/main/c/programmingMode.c

2
src/main/c/calculator.h

@ -85,6 +85,6 @@ double ConClock(double time, int startingUnit, int endingUnit);
double ConTime(double time, int startingUnit, int endingUnit);
int performOperation(int num1, char operator, int num2);
int performOperation(int num1, char operatorType, int num2);
#endif // CALCULATOR

4
src/main/c/programmingMode.c

@ -22,8 +22,8 @@ char getOperatorInput() {
}
// Calculation
int performOperation(int num1, char operator, int num2) {
switch (operator) {
int performOperation(int num1, char operatorType, int num2) {
switch (operatorType) {
case '+':
return num1 + num2;
case '-':

Loading…
Cancel
Save