Pure Programmer
Blue Matrix


Cluster Map

Project: Ferengi Currency Conversion

The [[Ferengi]] monetary system is based on gold pressed latinum (GPL) which comes in slips, strips and bars. The exchange rate is fixed at 100 slips per strip and 20 strips per bar. Compute the slips equivalent of 500 bars of GPL.

Output
$ rustc FerengiCurrencyConversion.rs warning: variable does not need to be mutable --> FerengiCurrencyConversion.rs:11:6 | 11 | let mut bars:isize = 500; | ----^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default warning: variable does not need to be mutable --> FerengiCurrencyConversion.rs:12:6 | 12 | let mut strips:isize = bars * STRIPS_PER_BAR * SLIPS_PER_STRIP; | ----^^^^^^ | | | help: remove this `mut` warning: 2 warnings emitted $ ./FerengiCurrencyConversion 500 bars = 1000000 strips

Solution