Advertisement
a53

semne

a53
Feb 20th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n;
  7. cin>>n;
  8. switch(n%4)
  9. {
  10. case 1: cout<<"+"; break;
  11. case 2: cout<<"---+"; break;
  12. case 3: cout<<"-+--+";
  13. }
  14. for(int i=0;i<n/4;i++)
  15. cout<<"+--+";
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement