Write a program to print the following series for n rows.
a
a b
a b c
a b c d
. . . nth row. . .
#include
#include
void main()
{
int i,j,l,n;
char ch;
clrscr();
cout<<”Enter how many lines : “;
cin>>n;
l=40;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
cout<<” “;
for(j=1,ch=’a’;j<=I;j++,ch++)
cout<<” “<
}
getch();
}
Sunday, December 6, 2009
Home »
C++ PROGRAM FOR PRINTING SERIES OF N ROWS
,
SERIES FOR N ROWS USING C++
» C++->SERIES FOR n ROWS
0 comments:
Post a Comment