From 07682736a7d723f6f95d26bdde08c287177aaeb9 Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 20:49:23 +0100 Subject: [PATCH] start point data type modification --- src/main/c/Calculator/calculator.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index 54d4c78..5733aa7 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -2,10 +2,10 @@ // Function prototypes void displayMenu(); -int add(int num1, int num2); -int subtract(int num1, int num2); -int multiply(int num1, int num2); -int divide(int num1, int num2); +double add(int num1, int num2); +double subtract(int num1, int num2); +double multiply(int num1, int num2); +double divide(int num1, int num2); double exponent(double base, double exponent); double modulus(double num1, double num2); double logarithm(double num); @@ -16,9 +16,8 @@ double sine(double angle); double cosine(double angle); double tangent(double angle); - int main() { - int choice, num1, num2, result; + double choice, num1, num2, result, angle; do { displayMenu();