#include
main()
{
int i,j;
for(i=0;i<11;i++)
{
int sum=1;
if(i!=0)
{
for(j=0;jsum*=2;
printf("the %d th power of 2 is:%d\n",i,sum);
}
else
printf("the 0th power of 2 is:1\n");
}
}
int n;
n=0.5;//2的负一次方
for(i = 0 ; i <= 10 ;i ++ ){
n *= 2;
//输出n的结果
}
#include
using std::cout;
using std::endl;
int main()
{
int digit;
int two=2;
cout << 1 << endl;
for (digit = 0 ; digit < 10; digit++)
{
cout << two << endl;
two *= 2;
}
return 0;
}
a=1;printf("%d",a)
for(i=1;i<11;i++;)
{a=2a;
printf("%d",a);
}