Write a program to find the um of following series
H =x²+ x⁴+ x⁶+............. +xⁿ
Answers
Answered by
2
Step 1: Start
Step 2: Read x, n values as integers
Step 3: Set i = 2, s = 1, pwr = 1, nr = 1
Step 4: Convert x1 into degrees
Step 5: Assign x1 as sum
Step 6: while (i <= n)
begin
pwr ← pwr + 2;
dr ← dr * pwr * (pwr - 1);
sum ← sum + (nr DIV dr) * s;
s ← s * (-1);
nr ← nr * x1 * x1;
i ← i + 2; hope it helps
end
Step 7: Print sum
Step 8: Stop
Step 2: Read x, n values as integers
Step 3: Set i = 2, s = 1, pwr = 1, nr = 1
Step 4: Convert x1 into degrees
Step 5: Assign x1 as sum
Step 6: while (i <= n)
begin
pwr ← pwr + 2;
dr ← dr * pwr * (pwr - 1);
sum ← sum + (nr DIV dr) * s;
s ← s * (-1);
nr ← nr * x1 * x1;
i ← i + 2; hope it helps
end
Step 7: Print sum
Step 8: Stop
Similar questions