|
@ -189,67 +189,33 @@ double getValue(int choice) { |
|
|
printf("\nThe convertet result is %dlf %d³", result, Distance[endingUnit]); |
|
|
printf("\nThe convertet result is %dlf %d³", result, Distance[endingUnit]); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case 13: |
|
|
|
|
|
printf("\nEnter what the Unit is starting with (0 (24h), 1 (12h)): "); |
|
|
|
|
|
|
|
|
case 13://char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' }; |
|
|
|
|
|
printf("\nEnter what the Unit is starting with (0 ms, 1 s, 2 min, 3 h, 4 d, 5 w, 6 mon, 7 y): "); |
|
|
scanf("%d", &startingUnit); |
|
|
scanf("%d", &startingUnit); |
|
|
|
|
|
|
|
|
printf("\nEnter what the value should it be changed to (0 (24h), 1 (12h)): "); |
|
|
|
|
|
|
|
|
printf("\nEnter what the value should it be changed to (0 ms, 1 s, 2 min, 3 h, 4 d, 5 w, 6 mon, 7 y): "); |
|
|
scanf("%d", &endingUnit); |
|
|
scanf("%d", &endingUnit); |
|
|
|
|
|
|
|
|
result = ConArea(value, startingUnit, endingUnit); |
|
|
|
|
|
|
|
|
result = ConTime(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; |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
/* |
|
|
|
|
|
double ConSpeed(double speed, int startingUnit, int endingUnit) { |
|
|
|
|
|
switch (startingUnit) |
|
|
|
|
|
{ |
|
|
|
|
|
case 0: //kmh to x |
|
|
|
|
|
switch (endingUnit) |
|
|
|
|
|
{ |
|
|
|
|
|
case 0: //kmh to kmh |
|
|
|
|
|
return speed; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 1: //kmh to mph |
|
|
|
|
|
return speed * 0.621371; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
case 1: //mph to x |
|
|
|
|
|
switch (endingUnit) |
|
|
|
|
|
{ |
|
|
|
|
|
case 0: //mph to kmh |
|
|
|
|
|
return speed * 1.60934; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
case 14: |
|
|
|
|
|
printf("\nEnter what the Unit is starting with (0 (24h), 1 (12h)): "); |
|
|
|
|
|
scanf("%d", &startingUnit); |
|
|
|
|
|
|
|
|
case 1: //mph to mph |
|
|
|
|
|
return speed; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
printf("\nEnter what the value should it be changed to (0 (24h), 1 (12h)): "); |
|
|
|
|
|
scanf("%d", &endingUnit); |
|
|
|
|
|
|
|
|
default: |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
result = ConClock(value, startingUnit, endingUnit); |
|
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
|
printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double ConClock() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void unitConverterMode() { |
|
|
void unitConverterMode() { |
|
|
|
|
|
|
|
|
printf("Unit Converter Mode:\n"); |
|
|
printf("Unit Converter Mode:\n"); |
|
|