fork download
  1. int main (void) {
  2. int i;
  3. for (i = 0; i <= 4; i++) {
  4. float f = pow(10, i);
  5. int a = f;
  6. printf("10^%d = %.20f -> %d\n", i, f, a);
  7. }
  8. return 0;
  9. }
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
10^0 = 1.00000000000000000000 -> 1
10^1 = 10.00000000000000000000 -> 10
10^2 = 100.00000000000000000000 -> 100
10^3 = 1000.00000000000000000000 -> 1000
10^4 = 10000.00000000000000000000 -> 10000