#include <stdio.h>

int divisore(int n, int d) {
    if( (n%d) == 0 ) {
        return 1;
    } else {
        return 0;
    }
}

int main() {
    // trovo tutti i divisori di un intero m
    int i, m=9;
    for(i=1;i<=m;i++) {
        if( divisore(m,i) ) {
            printf("%d è un divisore di %d\n",i,m);
        }
    }
}

Embed on website

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