Write a program to display the series[2,15,41,80,132,197………] in windows form application?
Loading
Write a program to display the series[2,15,41,80,132,197………] in windows form application?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.


Found it on internet, you can implement it using winform as you wish
using System;
class GFG{
static void printSeries(int N)
{
int ith_term = 0;
// Generate the ith term and
for(int i = 1; i <= N; i++)
{
ith_term = (13 * i * (i - 1)) / 2 + 2;
Console.Write(ith_term + ", ");
}
}
// Driver Code
public static void Main(String[] args)
{
int N = 7;
printSeries(N);
}
}
Sachin SinghPosted Jul 24, 2022, 10:12 AM
15 + (13 * 2) = 41
41 + (13 * 3) = 80
80 + (13 * 4) = 132
132 + (13 * 5) = 197.
Jaydeep PatilPosted Jul 23, 2022, 4:33 AM
voidNumberSeries(intN){intith_term = 0;for(inti = 1; i <= N; i++) {ith_term = (13 * i * (i - 1)) / 2 + 2;cout << ith_term <<", ";}}Vishal YelvePosted Jul 22, 2022, 12:52 PM