Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- switch(n%4)
- {
- case 1: cout<<"+"; break;
- case 2: cout<<"---+"; break;
- case 3: cout<<"-+--+";
- }
- for(int i=0;i<n/4;i++)
- cout<<"+--+";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement