|
@ -13,7 +13,8 @@ double value, result; |
|
|
char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'}; |
|
|
char Distance[] = { 'mm', 'cm', 'm', 'km', 'feet/inch', 'miles'}; |
|
|
char Weight[] = { 'mg', 'g', 'kg', 't', 'pounds'}; |
|
|
char Weight[] = { 'mg', 'g', 'kg', 't', 'pounds'}; |
|
|
char Fluid[] = { 'ml', 'l' }; |
|
|
char Fluid[] = { 'ml', 'l' }; |
|
|
char Temp[] = {'celsius', 'fahrenheit'} |
|
|
|
|
|
|
|
|
char Temp[] = { 'celsius', 'fahrenheit' }; |
|
|
|
|
|
char Speed[] = { 'km/h','mp/h' }; |
|
|
char Data[] = { 'B', 'KB', 'MB', 'GB', 'TB', 'PT' }; |
|
|
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' }; |
|
|
char currency[] = { 'E', 'D', 'R' }; |
|
@ -115,15 +116,25 @@ 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 6://'km/h','mp/h' |
|
|
|
|
|
printf("\nEnter what the Unit is starting with (0 km/h, 1 mp/h): "); |
|
|
|
|
|
scanf("%d", &startingUnit); |
|
|
|
|
|
|
|
|
|
|
|
printf("\nEnter what the value should it be changed to (0 km/h, 1 mp/h): "); |
|
|
|
|
|
scanf("%d", &endingUnit); |
|
|
|
|
|
|
|
|
|
|
|
result = ConSpeed(value, startingUnit, endingUnit); |
|
|
|
|
|
|
|
|
|
|
|
printf("\nThe convertet result is %dlf %d", result, Distance[endingUnit]); |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double ConSpeed() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double ConLiter() { |
|
|
double ConLiter() { |
|
|
|
|
|
|
|
|