|
@ -4,7 +4,7 @@ |
|
|
#include <math.h> |
|
|
#include <math.h> |
|
|
#include <stdbool.h> |
|
|
#include <stdbool.h> |
|
|
|
|
|
|
|
|
#include "taschenrechner.h" |
|
|
|
|
|
|
|
|
#include "calculator.h" |
|
|
// Unit converter mode |
|
|
// Unit converter mode |
|
|
|
|
|
|
|
|
int choice, startingUnit, endingUnit; |
|
|
int choice, startingUnit, endingUnit; |
|
@ -174,7 +174,7 @@ double getValue(int choice) { |
|
|
|
|
|
|
|
|
result = ConArea(value, startingUnit, endingUnit); |
|
|
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; |
|
|
break; |
|
|
|
|
|
|
|
|
case 12://char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'}; |
|
|
case 12://char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'}; |
|
@ -186,7 +186,7 @@ double getValue(int choice) { |
|
|
|
|
|
|
|
|
result = ConArea(value, startingUnit, endingUnit); |
|
|
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; |
|
|
break; |
|
|
|
|
|
|
|
|
case 13://char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' }; |
|
|
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("10. Convert Data size (MB, GB, TB)\n"); |
|
|
|
|
|
|
|
|
printf("Area/Volume conversions \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("Time conversion \n"); |
|
|
printf("13. Convert time (s, m, h, d, w, m, y) \n"); |
|
|
printf("13. Convert time (s, m, h, d, w, m, y) \n"); |
|
|