Computer Science, asked by ahanya49, 7 months ago

Write a program to sum the given sequence:

c. 2/9 + 5/13 + 8/17 …………………(print 7 terms)

d. 1

2

+ 22

+ 32+ 42

+ …………+ n2

(input n)​

Answers

Answered by thoratisatya98
0

Answer:

// C# program to illustrate...

// Summation of series

using System;

class GFG

{

// function to calculate sum of series

static int summingSeries(long n)

{

// Using the pow function calculate

// the sum of the series

return (int)Math.Pow(n, 2);

}

// Driver code

public static void Main(String[] args)

{

int n = 100;

Console.Write("The sum of n term is: " +

summingSeries(n));

}

}

// This code contribute by Parashar...

Similar questions