From c004c09c8aed5fb8f5db66214d9e0fbf63022f0b Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Wed, 7 Feb 2024 17:45:39 +0000 Subject: [PATCH] Updated file name from taschenrechner.h to calculator.h --- src/main/c/{taschenrechner.h => calculator.h} | 180 +++++++++--------- 1 file changed, 90 insertions(+), 90 deletions(-) rename src/main/c/{taschenrechner.h => calculator.h} (92%) diff --git a/src/main/c/taschenrechner.h b/src/main/c/calculator.h similarity index 92% rename from src/main/c/taschenrechner.h rename to src/main/c/calculator.h index aedb4f3..a559fa6 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/calculator.h @@ -1,90 +1,90 @@ -#ifndef TASCHENRECHNER_H -#define TASCHENRECHNER_H - -// add function -double add(double a, double b); - -// minus function -double minus(double a, double b); - -// multiply function -double multiply(double a, double b); - -// divide function -double divide(double a, double b); - -// get input and check if its a number -double testForNumber(); - -// get input and check if its a operator -char testForOperator(); - -// Square root function -double squareRootFunction(double x); - -//.. -// Trigonometric functions -double sineFunction(double angle); - -double cosineFunction(double angle); - -double tangentFunction(double angle); - -//.. -// Logarithmic functions -double logarithmFunction(double x); - -double naturalLogarithmFunction(double x); - -double logarithmBase2Function(double x); - -//.. -// Exponential function -double exponentialFunction(double x); - -// .. -// Bitwise AND function -int bitwiseAND(int num1, int num2); - -// Bitwise OR function -int bitwiseOR(int num1, int num2); - -// Bitwise XOR function -int bitwiseXOR(int num1, int num2); - -int mode(int userChoice); - -int displayMenu(); - -// Conversion Functions -double ConMeter(double meter, int startingUnit, int endingUnit); - -double ConMeterToFoot(double distance, int startingUnit, int endingUnit); - -double ConKilometerToMiles(double distance, int startingUnit, int endingUnit); - -double ConGram(double weight, int startingUnit, int endingUnit); - -double ConGramToPounds(double weight, int startingUnit, int endingUnit); - -double ConTemp(double temp, int startingUnit, int endingUnit); - -double ConSpeed(double speed, int startingUnit, int endingUnit); - -double ConLiter(double liter, int startingUnit, int endingUnit); - -double ConLiterToGallon(double fluid, int startingUnit, int endingUnit); - -double ConData(double data, int startingUnit, int endingUnit); - -double ConArea(double area, int startingUnit, int endingUnit); - -double ConVolume(double volum, int startingUnit, int endingUnit); - -double ConClock(double time, int startingUnit, int endingUnit); - -double ConTime(double time, int startingUnit, int endingUnit); - -int performOperation(int num1, char operator, int num2); - -#endif // TASCHENRECHNER_H +#ifndef CALCULATOR +#define CALCULATOR + +// add function +double add(double a, double b); + +// minus function +double minus(double a, double b); + +// multiply function +double multiply(double a, double b); + +// divide function +double divide(double a, double b); + +// get input and check if its a number +double testForNumber(); + +// get input and check if its a operator +char testForOperator(); + +// Square root function +double squareRootFunction(double x); + +//.. +// Trigonometric functions +double sineFunction(double angle); + +double cosineFunction(double angle); + +double tangentFunction(double angle); + +//.. +// Logarithmic functions +double logarithmFunction(double x); + +double naturalLogarithmFunction(double x); + +double logarithmBase2Function(double x); + +//.. +// Exponential function +double exponentialFunction(double x); + +// .. +// Bitwise AND function +int bitwiseAND(int num1, int num2); + +// Bitwise OR function +int bitwiseOR(int num1, int num2); + +// Bitwise XOR function +int bitwiseXOR(int num1, int num2); + +int mode(int userChoice); + +int displayMenu(); + +// Conversion Functions +double ConMeter(double meter, int startingUnit, int endingUnit); + +double ConMeterToFoot(double distance, int startingUnit, int endingUnit); + +double ConKilometerToMiles(double distance, int startingUnit, int endingUnit); + +double ConGram(double weight, int startingUnit, int endingUnit); + +double ConGramToPounds(double weight, int startingUnit, int endingUnit); + +double ConTemp(double temp, int startingUnit, int endingUnit); + +double ConSpeed(double speed, int startingUnit, int endingUnit); + +double ConLiter(double liter, int startingUnit, int endingUnit); + +double ConLiterToGallon(double fluid, int startingUnit, int endingUnit); + +double ConData(double data, int startingUnit, int endingUnit); + +double ConArea(double area, int startingUnit, int endingUnit); + +double ConVolume(double volum, int startingUnit, int endingUnit); + +double ConClock(double time, int startingUnit, int endingUnit); + +double ConTime(double time, int startingUnit, int endingUnit); + +int performOperation(int num1, char operator, int num2); + +#endif // CALCULATOR