Write a program in C to display the n terms of series and their sum.
[1-12+123-1234+12345 nth term]
Answers
Answered by
1
Answer:
OUTPUT:-
How many rows
5
1
12
123
1234
12345
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,row;
clrscr();
printf("\nHow many rows\n");
scanf("%d",&row);
for(i=1;i<=row;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
Similar questions