Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printf("Introduzca el importe: ");
- scanf("%f", &importe);
- a=importe-1.5;
- printf("\nEl cambio a devolver es: %.2f euros", a);
- parte_entera=a/1;
- parte_decimal=a-parte_entera;
- b=(parte_decimal/0.50);
- c=(parte_entera%2)/1;
- d=parte_entera/2;
- printf("\nSe devolver%cn %.0f moneda(s) de 50 centimos, %d moneda(s) de 1 euro y %d moneda(s) de 2 euros \n",160, b, c, d);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement