C++ Program to print given series:1 2 4 8 16 32 64 128.we make a simple program and try to run it.
C++ Program To Print given Series:1 2 4 8 16 32 64 128
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int i;
for(i=1;i<=128;i*=2)
cout<<i<<" ";
return 0;
}
Output of Program
1 2 4 8 16 32 64 128