In: Mechanical Engineering
It is desired to compute the sum of the first 10 terms of the series
14k3 = 20k2 + 5k, k = 1, 2, 3, …
a. Develop a pseudocode description of the required program.
b. Write and run the program described in part a.
(a)
Write the pseudo code.
initialize sum = 0
loop for k = 1…..10
temp = 14k3 – 20k2 + 5k
sum = sum + temp
print sum
(b)
Write the program.
Copyable code:
sum = 0;
for k= 1 : 10
val =14 * k^3 - 20 * k^2 + 5 * k;
sum=sum+val;
end
disp(sum);
(a)
Write the pseudo code.
initialize sum = 0