Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. void FRadical(long long n, int & x, int & y) {
  2.  
  3.    long long z;
  4.  
  5.    float l;
  6.  
  7.    bool gasit = 0;
  8.  
  9.    y = 1;
  10.  
  11.    while (!gasit) {
  12.  
  13.        z = n;
  14.  
  15.        if (z % y == 0) {
  16.  
  17.            z = z / y;
  18.  
  19.            l = sqrt(z);
  20.  
  21.            if (l == int(l)) {
  22.  
  23.                gasit = 1;
  24.  
  25.                break;
  26.  
  27.            }
  28.  
  29.            y++;
  30.  
  31.        } else y++;
  32.  
  33.    }
  34.  
  35.    x = l;
  36.  
  37. }
  38.  
  39. Citește mai multe pe Brainly.ro - https://brainly.ro/tema/6535287#readmore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement