#include<stdio.h> #include<math.h> //ART #define TOTAL_FIFTY 50 #define TOTAL_TWENTY 20 #define TOTAL_TEN 10 int withdraw; int total_fifty; int total_twenty; int total_ten; int no_fifties; int no_twenties; int no_tens; int fifties; int twenties; int tens; int main (void) { do { printf("Please enter amount of withdraw in multiples of $10.00\n$"); scanf("%d", &withdraw); } while( (withdraw%10)!=0 ); if (withdraw>=0){ printf("\nYour amount of $%d.00\n\n",withdraw); if (withdraw>=0) fifties=withdraw/TOTAL_FIFTY; no_fifties=withdraw-(fifties*TOTAL_FIFTY); if (no_fifties>=0) twenties=no_fifties/TOTAL_TWENTY; no_twenties=withdraw-(fifties*TOTAL_FIFTY)-(twenties*TOTAL_TWENTY); if (no_twenties>=0) tens=no_twenties/TOTAL_TEN; no_tens=withdraw-(fifties*TOTAL_FIFTY)-(twenties*TOTAL_TWENTY)-(tens*TOTAL_TEN); printf("Will be destributed in \n %d fifties, \n %d twenties, \n %d tens as change.\n\n", fifties,twenties,tens); } return (0) ; }

MOD EDIT: When posting code...USE CODE TAGS!!!

This post has been edited by **JackOfAllTrades**: 13 November 2010 - 04:53 AM