You are here:

- Home
- Computing/Technology
- C/C++
- C++
- how to calculate perfect Squares

Advertisement

Madam my Question is like that i had numbers from 1 to 10000 and i have to take only those numbers which are perfect Squares like 4,16,25,36,49,64,81

for( int i =2;i<=1000;i++)

{

for( int j =2;j<= i;j++)

{

if( (i%j) == 0)

{

if( i == (j*j))

{

cout<<"the square is"<< i;

}

}

}

}

Difficult questions related to C .

C ,vc ,opc ,windows CE, ActiveX **Education/Credentials**

Masters in electrical engineering