|
|
|
|
|
| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 18 Feb 2008 13:23:51 IST
|
|
|
#include<iostream.h> #include<conio.h> void main() { clrscr (); cout<<" Enter the number of lines: "; int n; cin>>n; int x=1; char ch='A';
for(int i=n;i>0;i--) { ch='A';
for(int j=(i-1);j>0;j--) { cout<<" "; }
for(int a=x;a>0;a--) { cout<<ch; ch++; } ch--;
for(int b=(x-1);b>0;b--) { ch--; cout<<ch; } x++; cout<<"\n"; }
x=1; for(int c=1;c<=n;c++) { ch='A';
for(int i=x;i>0;i--) { cout<<ch; ch++; }
x++; cout<<"\n"; }
getch();
}
|
Be not afraid of growing slowly.
Be afraid only of standing still.
 |
this reply: 5 points
(with 1 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
|
|
|
|
|
|
|