Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to simplify the simplest square root in c++
How to simplify the simplest square root in c++
# include & ltstdio.h & gt

# include & ltmath.h & gt

Master ()

{

int a,I,out,in;

Printf ("Please enter a positive integer:");

scanf("%d ",& ampa);

for(I = 1; I< = sqrt (a); i++)

If (a%(i*i)==0)

{

out = I;

in = a/(I * I);

}

if(in== 1)

Printf ("Result: %d\n", out);

other

Printf ("Result: %d*sqrt(%d)\n", out, in);

Returns 0;

}

//I succeeded in the test. Do you think it will go down?