&&&&&&&&&
&&&&&&&
&&&&&
&&&
&
Solution:
#include <iostream.h>
#include<conio.h>
void main ()
{
int i , n , j;
clrscr();
cout<<"Please Give the Value of N as height";
cin>>n;
for(i = n; i >0; i++)
{
for(j=n-i; j>0; j--)
cout<<" ";
for(j = 2*i-1; j>0; j--)
cout<<"&";
cout<<"\n";
}
getch();
}
there is a fault in i++
ReplyDeleteThere should be i--