|
|
@ -48,3 +48,19 @@ int mode(int userChoice){ |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// display the mode options: |
|
|
|
|
|
|
|
int displayMenu(){ |
|
|
|
|
|
|
|
printf("\nCalculator Modes: \n"); |
|
|
|
printf("\n1: Basic Mode\n"); |
|
|
|
printf("\n2: Scientific Mode (Trigonomertic functions, Logarithm and exponential functions.)\n"); |
|
|
|
printf("\n3: Graph Mode (Draw and visualize functions.)\n"); |
|
|
|
printf("\n4: Programming Mode (Binary , octal and hexadecimal )\n"); |
|
|
|
printf("\n5: Unit converter Mode (length, weight volume etc.)\n"); |
|
|
|
printf("\n0: Exit calculator\n"); |
|
|
|
|
|
|
|
return 1; // return 1 to check if the function works |
|
|
|
} |