C++ Program to print given series:1 2 4 8 16 32 64 128

CWC
0 Min Read

C++ Program to print given series:1 2 4 8 16 32 64 128

#include
#include
using namespace std;
int main()
{
int i;
for(i=1;i<=128;i*=2)
cout<<i<<" ";
return 0;
}
Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version