Онлайн компилятор C

#include <stdio.h> void print_simple(int n) { for(int i=2;i<=n;i++) { while(n%i==0) { printf("%d",i); n=n/i; } } }
This function prints the prime factors of a number by repeatedly dividing it by the smallest divisor found. It starts from 2 and checks each integer up to the current value of n, printing each factor when it divides evenly.

- The loop condition `i <= n` works correctly because n decreases as factors are removed, but consider what happens when n becomes 1 after all factors are found — the loop will still check remaining i values unnecessarily.
- The function does not print spaces or newlines between factors, so the output for a number like 12 would be "223" without any separation, which may be hard to read.