Question: Practice 7 Create a variable called totalSnacks and set it equal to 5 0 . Create a variable called numberOfHungryFriends and set it equal to
Practice
Create a variable called totalSnacks and set it equal to Create a variable called numberOfHungryFriends and set it equal to Now make a variable called
snacksPerPerson and set it equal to Create a constant called remainingSnacks and set it equal to totalSnacks minus numberOfHungryFriends times snacksPerPerson.
Print remainingSnacks.
Practice
Create a constant called splitItUp and set it equal to remainingSnacks divided by numberOfFriends. Print splitItUp. Is the number accurate? What happens if you change
the data types to Double?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
