cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
calculate engine purchase
calculate engine purchase
Feb 18, 2015 at 5:59pm UTC
relgin
(23)
I need to write a program that calculates how many boxes and packages are needed for a specific number of engines. I need to use integer division (/,%) to calculate the number of boxes and packages.
engines are purchase in:
box = 24 engines
package = 3 engines
for example: I need 30 engines, so i will need 1 box(24 engines) and 2 packages (6 engines)
how do i use integer division to calculate number of boxes and packages needed?
Last edited on
Feb 18, 2015 at 6:04pm UTC
Feb 18, 2015 at 6:16pm UTC
ButchCavendish
(111)
what if you need 25 engines ?
Topic archived. No new replies allowed.