Created
September 13, 2015 16:12
-
-
Save schweigert/73b88487cf441a0e5d1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main (void){ | |
| int Quantidade = 0; | |
| scanf ("%d", &Quantidade); | |
| printf ("%d\n",Quantidade); | |
| int Cedulas = ( Quantidade - (Quantidade%100))/100; | |
| printf ("%d nota(s) de R$ 100,00\n", Cedulas); | |
| Quantidade = Quantidade%100 ; | |
| Cedulas = ( Quantidade - (Quantidade%50))/50; | |
| printf ("%d nota(s) de R$ 50,00\n", Cedulas); | |
| Quantidade = Quantidade%50 ; | |
| Cedulas = ( Quantidade - (Quantidade%20))/20; | |
| printf ("%d nota(s) de R$ 20,00\n", Cedulas); | |
| Quantidade = Quantidade%20 ; | |
| Cedulas = ( Quantidade - (Quantidade%10))/10; | |
| printf ("%d nota(s) de R$ 10,00\n", Cedulas); | |
| Quantidade = Quantidade%10 ; | |
| Cedulas = ( Quantidade - (Quantidade%5))/5; | |
| printf ("%d nota(s) de R$ 5,00\n", Cedulas); | |
| Quantidade = Quantidade%5 ; | |
| Cedulas = ( Quantidade - (Quantidade%2))/2; | |
| printf ("%d nota(s) de R$ 2,00\n", Cedulas); | |
| Quantidade = Quantidade%2 ; | |
| printf ("%d nota(s) de R$ 1,00\n", Quantidade); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment