#include <iostream> #include <cmath> using namespace std; bool prost(int m){ int k = 0; for (int i=2; i<=sqrt(m); i++) if (m % i == 0) k++; return k==0; }
int main(){ int n, r; int i = 1; cout << "n = ", cin >> n, cout << "\n"; if (prost(n)) { cout << "1 * " << n << " = " << n << "\n";} else { r = n; while (r != 1){ i++; if (prost(i)){ while (r % i == 0){ r = r / i; cout << i; if (r != 1) cout << "*"; } } } cout << "=" << n << "\n"; } return 0; }
один из лучших програм это Unity
если у вас нет денег купить то там есть бесплатное версия
Для работы с Unity вам нужно знать С# или язык програмировани
Его можно учить с Youtube.com или с книги или из сайтов.
Если ответ был полезным то рад был
С уважением rasulserikuly :)