|
@ -1,4 +1,9 @@ |
|
|
#include "displayMenuCalculator.h" |
|
|
#include "displayMenuCalculator.h" |
|
|
|
|
|
|
|
|
|
|
|
// Note: |
|
|
|
|
|
/* This Function may or may not be implemented in actual program, even if it is merged to the main branch. |
|
|
|
|
|
If it is temporarily not included in the main Program, then this has a role in future Development of the Project */ |
|
|
|
|
|
|
|
|
int check() |
|
|
int check() |
|
|
{ |
|
|
{ |
|
|
if(a == 1) |
|
|
if(a == 1) |
|
@ -7,18 +12,20 @@ return 1; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void displayMenuCalculator(char x) |
|
|
void displayMenuCalculator(char x) |
|
|
{ |
|
|
{ |
|
|
if(x == 'c') |
|
|
if(x == 'c') |
|
|
{ |
|
|
{ |
|
|
if(check() == 1) |
|
|
if(check() == 1) |
|
|
{ |
|
|
{ |
|
|
printf(" 1. Add\n"); |
|
|
|
|
|
printf(" 2. Subtract\n"); |
|
|
|
|
|
printf(" 3. Multiply\n"); |
|
|
|
|
|
printf(" 4. Divide\n"); |
|
|
|
|
|
printf(" 5. Factorial\n"); |
|
|
|
|
|
|
|
|
printf(" %d. Add\n", operation1); |
|
|
|
|
|
printf(" %d. Subtract\n", operation2); |
|
|
|
|
|
printf(" %d. Multiply\n", operation3); |
|
|
|
|
|
printf(" %d. Divide\n", operation4); |
|
|
|
|
|
printf(" %d. Factorial\n", operation5); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|