#include <stdio.h>

int main() {

    int numero = 0;
    int divisore = 1;
    printf("Inseire un numero:\n");
    scanf("%d",&numero);
    printf("Divisori: ");
            while (divisore <= numero) {
                if (numero % divisore ==0)
                    printf("%d, ",divisore);
          divisore++; 
            }
}

Embed on website

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