Computer Science, asked by vaishnaviisingh21, 10 months ago

double SERIES (int N)
S=2-4+6-8.....N

Answers

Answered by nishapragu
0

Explanation:

This is a mathematical series program where a user must enter the number of terms up to which the sum of the series is to be found. Following this, we also need the value of x, which forms the base of the series.

Examples:

Input : x = 9, n = 10

Output : -5.1463

Input : x = 5, n = 15

Output : 0.2837

Similar questions