#include #include using namespace std; main(){ short x, x1, y, y1, r, r1, pomoc; cout << "Najmniejsza wspolna wielokrotnosc" << endl; cout << "Wprowadz dwie liczby calkowite dodatnie" << endl; cout << "x= "; cin >> x; cout << "y= "; cin >> y; if(x>y){ pomoc = x; x = y; y = pomoc; } x1 = x; y1 = y; while (x1 % y1) { r1 = x1 % y1; x1 = y1; y1= r1; } r=x*y/(r1); cout << "NWW(" << x << ", " << y << ") = " << r; getch(); }