Weigh without the ice
A fish-market dispatch command prepares crate weight slips and a fixed-price crate bill. Fresh crates include the standard ice allowance; the day’s selected fish kind receives the special crate price.
What needs to change
Repair net so the weight slip receives net grams for a fresh crate and the unchanged grams for dried fish.
Reproduce
- Compile with rustc, run the sample crates and compare each weight with the expected stdout.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains its imports, read_lines, parse and the complete main.
Input: one "fish grams" pair per line; dried fish names start with dried. A fresh crate includes 300 g of ice, so its gross weight is at least 300 g.