Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char ** argv)
- {
- int n[4] = {50, 10, 5, 1}, resul[4];
- int i, valor1, valor2 = 0;
- while( scanf("%i", &valor) )
- {
- if(valor == 0)
- {
- return 0;
- }
- valor2++;
- for(i = 0; i < 4; i++) {
- resul[i] = valor1 / n[i];
- valor1 = valor1 % n[i];
- }
- printf("Teste %i\n%i %i %i %i\n\n", valores, resul[0], resul[1], resul[2], resul[3]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement