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

Program

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i;

for(i=1;i<=128;i*=2)
cout<<i<<” “;
getch();
}

Leave a Comment

error: Alert: Content is protected!!