Optional Project 9: Saltwater Mixture

Intro Problem: Suppose you had 3 gallons of pure water and 4 gallons of salt water (that is 70% salt and 30% water).  If you combined these, you would have 2.8 gallons of salt out of 7 gallons of water which would result in a mixture that is 40% salt.


Optional Project 9: Variables 'gallonsWater', 'gallonsSaltWater', 'percentSalt' have been initialized. 

gallonsWater represents the amount of pure water poured into the mixture (3 in the example above)

gallonsSaltWater represents the amount of salt water poured into the mixture (4 in the example above)

percentSalt represents the percentage of salt in the salt water that is poured in the mixture (as a number from 0 to 100) (70 in the example above)

Task: Appropriately initialize the value 'percentSaltMixture' that represents the percentage of salt in the combined mixture (as a number from 0 to 100).  (percentSaltMixture would be 40 in the example above)

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0