Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- void NOD(int m,int n)
- {
- while(m!=0 && n!=0)
- {
- if (m>n)
- m=m%n;
- else n=n%m;
- }
- cout<<"NOD"<<m+n;
- }
- int main()
- {
- int b,x,l,y;
- float a=0;
- cin>>x;
- for(int i=1;i<=x;i++)
- {
- if(x%i==0)
- {
- a=sqrt(i);
- if (a==int(a))
- y=x/i;
- }
- }
- cout<<"a'="<<y;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment