write a program to diaplay a pyramid as shown:

Following output is obtained:


****

***

**

*



Select To use this code as it is.. select and copy paste this code into code.cpp file :)



  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. for(int i=1;i<=4;i++)
  7. { for(int j=4;j>=i;j--)
  8. cout<<"*";
  9. cout<<"\n";
  10. }
  11. getch();
  12. }

Check out this stream