Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int getInput ()
- {
- cout<<"What size is the box?"<<endl;
- int x;
- cin>>x;
- return x;
- }
- int main ()
- {
- int x = getInput ();
- for ( int i = 1; i <= x+2; i++ )
- {
- for ( int j = 1; j=x; j++)
- {
- if ( i == 1 || i == (x+2) )
- cout<<"+"<<endl;
- else {
- cout<<"^"<<endl;
- if (j==(x+2))
- cout<<endl;
- }
- }
- {
- for ( int m = 0; m <= x; m++ )
- {
- if ( m == 0 || m == (x+1) )
- cout<<"+";
- }
- {
- if ( (i>0) || (i<(x+1)) )
- cout<<"^";
- }
- {
- if ( (m>0) || (m<(x+1)))
- cout<<"^";
- }
- }
- else
- {
- for ( int g = 0; g <= x; g++)
- if (g == 0 || (g == (x+1)))
- cout << "|";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement