Wap in cpp to print following pattern

Wap in cpp to print following pattern
1
12
123
1234
12345

#include<iostream.h>
#include<conio.h>
void main()
{ int i,j;
for(i=1;i<=5;i++)
{

for(j=1;j<=i; j++)
{ cout<<”j”; }
}
}

1 comment:

  1. wap in cpp to print following pattern
    1
    13
    135
    1357
    13579

    ReplyDelete

If You Like The Post Or want to Add Something More
then feel free to comment