Guest User

Untitled

a guest
Nov 17th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n,x;
  8. cout<<"Enter the number of terms ";
  9. cin>>n;
  10. cout<<endl<<"Harshit Series for "<<n<<" terms is :"<<endl;
  11. x=1;
  12. for(int i=0;i<n;i++)
  13. {
  14. cout<<x<<" ";
  15. x=x*2;
  16. }
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment