Advertisement
Guest User

Untitled

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