You have created an infinite loop. If the loop starts, it will never exit the loop. It tests the value contained in amount to decide to continue or exit, but since the value of amount is not changed inside the loop, it will never exit. You either need to change the value of amount inside the loop or you need to use an if statement instead, so that it only executes once.
The assignment part of the statement, amount2=amount%25
counts the number of quarters. It doesn't deduct the value of those quarters from amount. You need to use curly braces {} to create a code block that will do both of those steps.
In addition, for your example, if it is less than 25 cents, it would skip the while loop because the test condition failed, and just move on to the next line of code.
But, if you think about it carefully, you should be able to do both steps without using an if or a while loop. ;-)
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)