Browse Source

Updated the header file to calculator.h

remotes/origin/feature
fdai7782 11 months ago
parent
commit
4ede29f313
  1. 12
      src/main/c/ConvertMode.c

12
src/main/c/ConvertMode.c

@ -4,7 +4,7 @@
#include <math.h>
#include <stdbool.h>
#include "taschenrechner.h"
#include "calculator.h"
// Unit converter mode
int choice, startingUnit, endingUnit;
@ -174,7 +174,7 @@ double getValue(int choice) {
result = ConArea(value, startingUnit, endingUnit);
printf("\nThe convertet result is %dlf %d²", result, Distance[endingUnit]);
printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]);
break;
case 12://char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'};
@ -186,7 +186,7 @@ double getValue(int choice) {
result = ConArea(value, startingUnit, endingUnit);
printf("\nThe convertet result is %dlf %d³", result, Distance[endingUnit]);
printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]);
break;
case 13://char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' };
@ -243,8 +243,8 @@ void unitConverterMode() {
printf("10. Convert Data size (MB, GB, TB)\n");
printf("Area/Volume conversions \n");
printf("11. Convert area (cm², m², km²) \n");
printf("12. Convert Volume (cm³, m³, km³)\n");
printf("11. Convert area (cm, m, km) \n");
printf("12. Convert Volume (cm, m, km)\n");
printf("Time conversion \n");
printf("13. Convert time (s, m, h, d, w, m, y) \n");
@ -256,4 +256,4 @@ void unitConverterMode() {
printf("\nEnter your choice (Exit with 0): ");
scanf("%d", &choice);
getValue(choice);
}
}
Loading…
Cancel
Save