Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void beolv(int &n)
- {
- cin>>n;
- }
- void kiir(int n)
- {
- cout<<n;
- }
- bool rel(int a,int b)
- {
- int i=2;
- bool f=1;
- if (a<b)
- {
- a=a+b;
- b=a-b;
- a=a-b;
- }
- while(i<=a/2)
- {
- if (a%i==0 && b%i==0)
- return 0;
- i++;
- }
- return 1;
- }
- int main()
- {
- int a,b;
- beolv(a);
- beolv(b);
- if (rel(a,b)==0)
- cout<<"nem";
- else
- cout<<"igen";
- return 0;
- }
Add Comment
Please, Sign In to add comment