I have a product which has three sizes: 1 gal ($20), 5 gal ($30), and 10 gal ($35). So I need to make a Fortran program which prompts the following to a consumer:
*How many gallons are needed? (input)
I understand how to get it to prompt this, but I am confused on the following step:
*The program needs to give a combination of the sizes for the consumer to meet their gallon amount requirement.
For Example:
*(input)*How many gallons are needed? 26
....
*(output)*You can buy two 10 gallon containers, one 5 gallon container, and one 1 gallon container for a total price of $120 (USD)
Does this make sense? I understand this is an odd question, but it is part of my class-project and can't figure it out. If anyone has any suggestions (please be as clear and elementary as possible), it would be much appreciated.
*How many gallons are needed? (input)
I understand how to get it to prompt this, but I am confused on the following step:
*The program needs to give a combination of the sizes for the consumer to meet their gallon amount requirement.
For Example:
*(input)*How many gallons are needed? 26
....
*(output)*You can buy two 10 gallon containers, one 5 gallon container, and one 1 gallon container for a total price of $120 (USD)
Does this make sense? I understand this is an odd question, but it is part of my class-project and can't figure it out. If anyone has any suggestions (please be as clear and elementary as possible), it would be much appreciated.