for (int i=0; i<30; i ++)
{ a=pow(i,2);
cout<<a<<endl;
}
the code produces the following output .. 0 1 4 9 16 24 36 49 64 81 99 120 and so on it is reducing the squares at certain values by1 like for 5 it produces 24 and 10 it gives 99 and so on.
for (int i=0; i<30; i ++)
{
cout<<pow(i,2);
}
the above code works fine . please help me ..and tell me whats wrong when i am doing it with the help of a variable