- Education Resources
PrivacyContact Gas Price Pseudocode
Algorithm
- Input the cost per liter in Euros: cost
- Input the conversion rate for Euros to dollars: exchange
- priceGallons=cost*3.78
- priceDollars=[priceGallon*exchage
- Output priceDollars
Pseudocode:
- declare the variables: cost, exchange, priceGallons, priceDollars
- prompt for cost
- input cost
- prompt exchange
- input exchange
- priceGallons=cost*3.78 (print out)
- priceDollars=[priceGallon*exchage
- Output priceDollars