201

#include<stdio.h>

#include<math.h>

int main(void)

{

         int i,n;

         double power;

 

         printf("Enter n:");

         scanf("%d",&n);

         for(i=0;i<=n;i++){

                   power=pow(2,i);

                   printf("pow(2,%d)=%.0f\n",i,power);

         }

 

         return 0;

}

posted @ 2013-10-02 20:30  zhaoyang16  阅读(120)  评论(0编辑  收藏  举报