amount = input ("enter amount: ") hundredDollar = amount / 100 amount = amount % 100 fiftyDollar = amount / 50 amount = amount % 50 twentyDollar = amount / 20 amount = amount % 20 tenDollar = amount / 10 amount = amount % 10 fiveDollar = amount / 5 amount = amount % 5 oneDollar = amount / 1 amount = amount % 1 quarter = amount / .25 amount = amount % .25 dime = amount / .10 amount = amount % .10 nickel = amount / .05 amount = amount % .05 penny = amount / .01 amount = amount % .01 print(int(hundredDollar) + " hundred dollar bills") print(int(fiftyDollar) + " fifty dollar bills") print(int(twentyDollar) + " twenty dollar bills") print(int(tenDollar) + " ten dollar bills") print(int(fiveDollar) + " five dollar bils") print(int(oneDollar) + " one dollar bills") print(int(quarter) + " quarters") print(int(dime) + " dimes ") print(int(nickel) + " nickels") print(int(penny) + " pennies") So the objective of this program is to output maximum number of dollar bills that fit in the amount, then the maximum number of hundred, fifty, dollar bills, then 20, then 10, 5 and 1. After that, display the maximum number of quarters, number of dimes, nickels, and pennies.
For example $100 could be displayed as 10000 pennies, or 2 fifty dollar bills or 5 twenty dollar bills. But the correct answer is the maximum number of 100 dollar bills first: 1 one hundred dollar bill. Display only the amount of a denomination if it is not zero.
This issue I'm having is my input keeps reading as a string instead of an int how can I solve this issue