#include<iostream>
#include<cstdlib>
using namespace std;
int NWD(int a, int b)
{
if(b!=0)
return NWD(b,a%b);
return a;
}
int main()
{
int a, b;
cout<<"Podaj dwie liczby: ";
cin>>a>>b;
cout<<"NWD("<<a<<","<<b<<") = "<<NWD(a,b)<<endl;
system("pause");
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNzdGRsaWI+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKaW50IE5XRChpbnQgYSwgaW50IGIpCnsKICAgIGlmKGIhPTApCiAgICAJcmV0dXJuIE5XRChiLGElYik7CgkKICAgIHJldHVybiBhOwp9CiAKaW50IG1haW4oKQp7CiAgICBpbnQgYSwgYjsKIAogICAgY291dDw8IlBvZGFqIGR3aWUgbGljemJ5OiAiOwogICAgY2luPj5hPj5iOwogCiAgICBjb3V0PDwiTldEKCI8PGE8PCIsIjw8Yjw8IikgPSAiPDxOV0QoYSxiKTw8ZW5kbDsKIAogICAgc3lzdGVtKCJwYXVzZSIpOwogICAgcmV0dXJuIDA7Cn0=
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:1: error: class, interface, or enum expected
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<cstdlib>
^
Main.java:5: error: class, interface, or enum expected
int NWD(int a, int b)
^
Main.java:10: error: class, interface, or enum expected
return a;
^
Main.java:11: error: class, interface, or enum expected
}
^
Main.java:17: error: class, interface, or enum expected
cout<<"Podaj dwie liczby: ";
^
Main.java:18: error: class, interface, or enum expected
cin>>a>>b;
^
Main.java:20: error: class, interface, or enum expected
cout<<"NWD("<<a<<","<<b<<") = "<<NWD(a,b)<<endl;
^
Main.java:22: error: class, interface, or enum expected
system("pause");
^
Main.java:23: error: class, interface, or enum expected
return 0;
^
Main.java:24: error: class, interface, or enum expected
}
^
12 errors