Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Purpose: To practice the use of arithmetic expressions. Department of Computer Science 1 7 6 Thorvaldson Building 1 1 0 Science Place, Saskatoon, SK ,
Purpose: To practice the use of arithmetic expressions.
Department of Computer Science
Thorvaldson Building
Science Place, Saskatoon, SK SN C Canada Telephone: Facsimile:
CMPT
Winter Introduction to Computer ScienceQuestion points:
The notorious pirate, Tractor Jack, has spent the summer sailing up and down the Saskatchewan River, raiding silos, and stealing tons of wheat, barley and other grains. With winter coming, its time for Tractor Jack to divide up this booty amongst his crew. The accord Tractor Jack has with his crew is that, as captain, he receives of all the booty. The rest is to be divided up amongst his crew in equal shares. Finally, Jack, being a socially responsible pirate, anonymously donates of his own share of the booty to the Saskatoon Food Bank.
Write a program for Tractor Jack that will ask the user to input the total value of booty plundered in dollars and the number of crew not including Tractor Jack himself Then the program should display the value of Tractor Jacks share of the booty before his charitable donation the value of the remaining share to be divided amongst the crew, the value of booty that each crew member receives, and the amount of money Jack donates to the food bank.
You may assume that the user supplies valid input from the console, that is a positive number for the amount of plunder, and a positive integer for the number of crew.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started