Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, x, i, j, div;
- cin>>n;
- for(i=0; i<n; i++)
- {
- cin>>x;
- for(j=1; j<=x; j++)
- {
- if(x%j==0 && j%2==1)
- div=j;
- }
- cout<<div<<" ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement