Parade length

Tags
Challenge
No

Write a program to help small towns estimate the length of parades, like their July 4th parade.

Parades have floats and marching bands. Each float needs 30 meters. Each band needs 50 meters.

Sample I/O:

  • How many floats? 5
  • How many bands? 2
  • Total length: 250

Both inputs must be numbers, zero or more. Floats cannot be more than 10. Bands cannot be more than 5. Display appropriate error messages as shown below.

More I/O:

  • How many floats? some
  • Sorry, you must enter a number.

Even more I/O:

  • How many floats? -3
  • Sorry, please enter a number zero or more, and ten or less.

Yet more I/O:

  • How many floats? 11
  • Sorry, please enter a number zero or more, and ten or less.

Yes, more I/O:

  • How many floats? 3
  • How many bands? not sure
  • Sorry, you must enter a number.

Upload a zip of your project folder. The usual coding standards apply.

Where referenced