Browse Source

case square

remotes/origin/Ulrich
Ulriche Nguefack 11 months ago
parent
commit
93a49e367a
  1. 6
      src/main/c/Calculator/calculator.c

6
src/main/c/Calculator/calculator.c

@ -82,6 +82,12 @@ int main() {
result = squareRoot(num1); result = squareRoot(num1);
printf("Result: %lf\n", result); printf("Result: %lf\n", result);
break; break;
case 10:
printf("Enter a number: ");
scanf("%lf", &num1);
result = square(num1);
printf("Result: %lf\n", result);
break;
case : case :
printf("Exiting...\n"); printf("Exiting...\n");
break; break;

Loading…
Cancel
Save