#include <iostream>

using namespace std;


int nwd(int a, int b) {
    while (b != 0) {
        int temp = b;
        b = a % b;
        a = temp;
    }
    return a;
}

int nww(int a, int b) {
    return a * b / nwd(a, b);
}

int main() {
     int a,b;
    
    cout << "Podaj dwie liczby: " << endl;
    cin >> a >> b;

    cout << "NWW (" << a << "," << b << ") wynosi:" << nww(a, b) << endl;

    
    return 0;
}

Embed on website

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