TOPIC

5% não localizei o erro

ssdsantos0 asked 3 months ago

include

int main (){

int cedula ; scanf ("%d",&cedula);

int notacem , restocem ; notacem = cedula / 100; restocem = cedula % 100;

int nota50 , resto50 ; nota50 = restocem / 50; resto50 = restocem % 50;

int nota20 , resto20; nota20 = resto50 / 20 ; resto20 =resto50 % 20 ;

int nota10 , resto10 ; nota10 = resto20 / 10; resto10 = resto20 % 10;

int nota5 , resto5; nota5 = resto10 / 5 ; resto5 = resto10 % 5;

int nota2 , resto2 ; nota2 = resto5 / 2; resto2 = resto5 % 2;

printf("%d nota(s) de R$ 100,00 \n",notacem); printf("%d nota(s) de R$ 50,00\n",nota50); printf("%d nota(s) de R$ 20,00\n",nota20); printf("%d nota(s) de R$ 10,00\n",nota10); printf("%d nota(s) de R$ 5,00\n",nota5); printf("%d nota(s) de R$ 2,00\n",nota2); printf ("%d nota(s) de R$ 1,00\n",resto2);

return 0; }

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.