|
|
@ -16,7 +16,7 @@ char Fluid[] = { 'ml', 'l' , 'gallon'}; |
|
|
|
char Temp[] = { 'celsius', 'fahrenheit' }; |
|
|
|
char Speed[] = { 'km/h','mp/h' }; |
|
|
|
char Data[] = { 'B', 'KB', 'MB', 'GB', 'TB', 'PT' }; |
|
|
|
char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y' }; |
|
|
|
char Time[] = { 'ms', 's', 'min', 'h', 'd', 'w', 'mon', 'y'}; |
|
|
|
char currency[] = { 'E', 'D', 'R' }; |
|
|
|
|
|
|
|
|
|
|
@ -189,66 +189,32 @@ double getValue(int choice) { |
|
|
|
printf("\nThe convertet result is %dlf %d³", result, Distance[endingUnit]); |
|
|
|
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); |
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
result = ConArea(value, startingUnit, endingUnit); |
|
|
|
result = ConTime(value, startingUnit, endingUnit); |
|
|
|
|
|
|
|
printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); |
|
|
|
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 14: |
|
|
|
printf("\nEnter what the Unit is starting with (0 (24h), 1 (12h)): "); |
|
|
|
scanf("%d", &startingUnit); |
|
|
|
|
|
|
|
case 1: //mph to x |
|
|
|
switch (endingUnit) |
|
|
|
{ |
|
|
|
case 0: //mph to kmh |
|
|
|
return speed * 1.60934; |
|
|
|
break; |
|
|
|
printf("\nEnter what the value should it be changed to (0 (24h), 1 (12h)): "); |
|
|
|
scanf("%d", &endingUnit); |
|
|
|
|
|
|
|
case 1: //mph to mph |
|
|
|
return speed; |
|
|
|
break; |
|
|
|
result = ConClock(value, startingUnit, endingUnit); |
|
|
|
|
|
|
|
default: |
|
|
|
printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double ConClock() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void unitConverterMode() { |
|
|
|
|
|
|
|