Help

I wrote this code.
1
2
3
4
5
6
7
8
#include <math.h>
#include <iostream>
using namespace std;
int main()
{
  for(int i=0;i<5;i++)
  cout << (int)(pow(10,i))<< endl;
}

Why my output is
1
10
99
1000
9999

Process returned 0 (0x0) execution time : 0.016 s
Press any key to continue.
Which compiler/IDE are you using?

Dunno why but it in not executing in cpp.sh and c::b shows 1 10 100 1000...

I am using codeblocks too
I agree with programmer007, shows the correct values on mine as well. If I were to place any bets I bet you're not actually executing the code you put here, I recommend closing everything in your IDE, and restarting, make sure the project you're working on is active, and the file you're working on is included in that project. Check back in when you've tried that!
Topic archived. No new replies allowed.