#include <stdio.h>
#include <stdlib.h>

void print_prime_factors(int n)
{
    if (n == 1)
    {
        printf("1");
            return ;
    }
    int factor = 2;
    int first = 1; 
    while (n > 1)
        {
            while (n % factor == 0)
                {
                    if (!first)
                        printf("*");
                    printf("%d", factor);
                    n /= factor;
                    first = 0;
                }
                factor++;
        }
}

int main(int ac, char **av)
{
    int n;
    
    if (ac != 2)
    {
        printf("\n"); 
        return 0;
    }
    n = atoi(av[1]);
    if (n <= 0)
    {
        printf("\n");
        return 0;
    }
    print_prime_factors(n);
    printf("\n");
    return (0);
}

Embed on website

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