fork download
  1. #include<cstdio>
  2. #include<cstdlib>
  3. #include<math.h>
  4. using namespace std;
  5. main()
  6. {
  7. printf("正常二方(double→int)%d\n\n\n",(int)(pow(10,2))); //正常的二方
  8. printf("十的幾次方:(double→int)\n");
  9. int i=0;
  10. //for (int i=0;i<=9;i++)
  11. do
  12. {
  13. printf("%-5d",i);
  14. printf ("%d\n",(int)pow(10,i));
  15. i++;
  16. }
  17. while(i<=9);
  18. system("pause");
  19. }
  20.  
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
正常二方(double→int)100


十的幾次方:(double→int)
0    1
1    10
2    100
3    1000
4    10000
5    100000
6    1000000
7    10000000
8    100000000
9    1000000000