Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int divizor (int a , int b , int c)
- {
- int nr=0,d=1;
- while(d<=a/2 && d<=b/2 && d<=c/2)
- {
- if(a%d==0 && b%d==0 && c%d==0)
- {
- nr++;
- d++
- }
- else
- d++;
- }
- return nr;
- }
- int main()
- {
- int a,b,c;
- cout<<"a=";cin>>a;
- cout<<"b=";cin>>b;
- cout<<"c=";cin>>c;
- cout<<divizor(a,b,c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement