W.A.P. C++

WAP | CPP | Programs in C++ | C++ Solutions

write a program to diaplay a pyramid as shown:


The following output is displayed:
1
12
123
1234
12345
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<=5;i++)
  7. {
  8. for(int j=1;j<=i;j++)
  9. cout<<j;
  10. cout<<"\n";
  11. }
  12. getch();
  13. }

0 comments:

Search

About WAP C++

Here you'll find a wide range of programs' solution ranging from beginer level to advanced level.
All programs here are made, compiled and tested by me..and are running absolutely fine.. still if you find any bug in any program do let me know :)

Followers

Subscribe via email

Enter your email address:

Delivered by FeedBurner

my Binary Log

Blog Archive



eXTReMe Tracker