*WAP to print the following output:
N
N E
N E P
N E P A
N E P A L
The code goes like this:
#include<stdio.h>
int main()
{
char name[]="NEPAL";
int i,j;
for(i=0;i<=5;i++)
{
for(j=0;j<i;j++)
{
printf(" %c ",name[j]);
}
printf("\n");
}
return 0;
}
Output:
Home / Nepal /
NEPAL series in C /
Print the series in C /
String series in C
/ WAP to print NEPAL series in C
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment