Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n;
  8. cout<<"Unesite broj redova"<<endl;
  9. cin>> n;
  10.  
  11.  
  12. for(int i=0;i<n;i++)
  13. {
  14. cout<<"*";
  15. for(int k=0;k<i;k++) cout<<" ";
  16. for(int k=0;k<n+1-n;k++)cout<<"*";
  17. for(int k=0;k<n-1-i;k++) cout<<" ";
  18. cout<<"*";
  19. cout<<endl;
  20.  
  21.  
  22.  
  23. }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement