Wap in c to print 2,6,12,20....upto 20th term using for loop
Answers
Answered by
1
#include<stdio.h>
int main()
{
int n,i;
printf("Enter the range of number(Limit):");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("%d ",(i*i)-i);
}
}
Similar questions
Geography,
1 month ago
Social Sciences,
1 month ago
English,
1 month ago
Social Sciences,
3 months ago
Social Sciences,
3 months ago
Math,
9 months ago
Math,
9 months ago
Hindi,
9 months ago