Write a driver program (program that calls a function) called “hw4a.cpp” and a recursive function to compute the series
S(n) = 2 + 4 + 6 + …+ 2n where n is an integer.
See Exercise 3 Section 3.8 pg. 194 for a hint! You MUST solve this problem by writing a recursive function like the program example “factorial” discussed in class. Otherwise no credit will be given. Test your program with the values n = 10, 50, 100.
More C++, help please?
2n+x^2=s
sn^2+ns= m
m^2-mns= q
i tested and it works
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment