#include <stdio.h>

int main() {
    int c, c1, moedas=0;
    scanf("%d", &c);

    c1 = c;
    moedas = moedas+c1/100;
    c1 = c1%100;
    moedas = moedas+c1/50;
    c1 = c1%50;
    moedas = moedas+c1/25;
    c1 = c1%25;
    moedas = moedas+c1/10;
    c1 = c1%10;
    moedas = moedas+c1/5;
    c1 = c1%5;
    moedas = moedas+c1;

    printf("%d\n", moedas);
    
    printf("%d\n", c/100);
    c = c%100;
    
        
    printf("%d\n", c/50);
    c = c%50;
    
    
    printf("%d\n", c/25);
    c = c%25;
    
    printf("%d\n", c/10);
    c = c%10;
    
    printf("%d\n", c/5);
    c = c%5;
    
    printf("%d\n", c);
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: