This program accepts a number of cents between 5 and 95 and sorts it out into change of 50,20,10 and 5 cent pieces. It seems to be having errors in the printf where it printf out the number of coins.
lines 40-43- unterminated string in function main
line40- function call ) missing in function main.
line 40- undefined symbol 'd' in function main.
Code:#include <stdio.h> int main() { int num; int fifty = 0; int twenty = 0; int ten = 0; int five = 0; printf("Please insert change"); scanf("%d%*c", &num); while(num >= 5 && num <= 95) { if(num >= 50) { fifty++; num=-50; } else if(num >= 20) { twenty++; num=-20; } else if(num >= 10) { ten++; num=-10; } else if(num >= 5) { five++; num=-5; } } printf("Number of 50 cents "%d", fifty); printf("Number of 20 cents "%d", twenty); printf("Number of 10 cents "%d", ten); printf("Number of 5 cents "%d", five); return(0); }