#include using namespace std; /* Conjecture de Syracuse */ int main(){ int i, u, u0; cout << "Entier positif ? "; cin >> u0; u = u0; i = 0; while (u != 1){ i++; if (u%2 == 0) u = u/2; else u = 3*u + 1; cout << i << " : " << u << endl; } cout << u0 << " est devenu 1 apres " << i << " iteration(s)" << endl; return 0; }