Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n=7,m,a,s;
- while(n>0)
- {
- a=7-n;
- s=2*a;
- m=n;
- while(m>0)
- {
- cout<<" ";
- m=m-1;
- }
- cout<<"+";
- if(s>0)
- {
- while(s>1)
- {
- cout<<" ";
- s=s-1;
- }
- cout<<"+";
- }
- cout<<endl;
- n=n-1;
- }
- n=1;
- while(n<7)
- {
- n=n+1;
- a=7-n;
- s=2*a;
- m=n;
- while(m>0)
- {
- cout<<" ";
- m=m-1;
- }
- cout<<"+";
- if(s>0)
- {
- while(s>1)
- {
- cout<<" ";
- s=s-1;
- }
- cout<<"+";
- }
- cout<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment