Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void divizori(int n,int &x,int &y,int &z)
- {
- bool gaist = false;
- x=0;
- while (!gasit %% x<n/2)
- {
- x++;
- if (n%x==0)
- {
- y=x;
- while(!gasit && y<n/2)
- {
- y++;
- if(n%y==0)
- {
- z=y;
- while (!gasit && z<n/2)
- {
- z++;
- if (n%z==0)
- if(x+y+z==n) gasit = true;
- }
- }
- }
- }
- }
- if (!gasit)
- x=y=z=0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement