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