Message Boards Message Boards

0
|
8772 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Convert USD$XYZ/gallon into CAD/L, or vice versa

Posted 11 years ago

Input: $3.56/gallon into Canadian dollars per liter

I would like to convert the a price of US gas, which is US dollars per gallon, into Canadian format, which is Canadian cents per liter. How do I do this?

POSTED BY: Red Ryder
4 Replies

Sandu gave you that answer in his second bit of code. Just type

$ 3.56/Gallon in CAD/Liter

into Wolfram|Alpha:

http://www.wolframalpha.com/input/?i=%24+3.56%2FGallon+in+CAD%2FLiter

POSTED BY: David Reiss
Posted 11 years ago

Sandu. How did you learn of the way to format this query? You have saved me so much time in calculating this. Thanks.

David. Sandu must have updated his reply to add that second bit of code (the W|A code) :)

POSTED BY: Red Ryder
Posted 11 years ago

Sandu, Sorry, I wanted help for use on the wolframalpha.com website.

POSTED BY: Red Ryder
Posted 11 years ago
UnitConvert[Quantity[3.56, "USD"], "CAD"]/UnitConvert[Quantity[1, "Gallon"], "Liter"]

or

WolframAlpha["$ 3.56/Gallon in CAD/Liter"]

or just use the content from the last command to ask Wolfram Alpha online (instead of "CAD" you may also write "Canadian cents" to have the result in cents).

POSTED BY: Sandu Ursu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract