Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,x;
- cout<<"Enter the number of terms ";
- cin>>n;
- cout<<endl<<"Harshit Series for "<<n<<" terms is :"<<endl;
- x=1;
- for(int i=0;i<n;i++)
- {
- cout<<x<<" ";
- x=x*2;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment