Computer Science, asked by SiddharthAasal, 1 year ago

write a program in java to print the series 1 3 6 10 15 21 28

Answers

Answered by Joshuawoskk
0
#include<stdio.h>
#include<conio.h>
int main()
{
int i,j=1,k=1,n;
printf("\nEnter number of terms:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("%d\t",k);
j=j+1;
k=k+j;
}
getch();
return 0;
}

SiddharthAasal: please tell how to make it in bluej
Similar questions