Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int NWW(int a, int b);
- int main()
- {
- int a, b;
- cout << "Podaj dwie liczby: ";
- cin >>a>>b;
- cout << "NWW(" <<a<< "," <<b<< ") = " << (a*b)/NWW(a, b) << endl;
- return 0;
- }
- int NWW(int a, int b)
- {
- if (b==0){
- return a;}
- NWW(b,a%b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement