Find the output 1,2,4,8 program on c plus plus


#include<iostream.h>
void main()
{
int x;
for (x=1;x <=12; x*=2)
cout<<x<<endl;
}


Output--

1
2
4
8

[Program finished]


Post a Comment

Previous Post Next Post