An object-oriented program

                5.Write an object-oriented program in C++ to find the sum of the following series:

(a) sum = 1 + 2 + 3 + ….. + n

(b) sum = 1 + 3 + 5 + ….. + n

(c) sum = 1 + 2 + 4 + ….. + n

(d) sum = 12 + 22 + 32 + 32 + 42 + … + n2

(e) sum = 13 + 23 + 33 + 43 + … + n3

(f) sum = 1 + 22 + 42 + … + n2

(g) sum = 1 + 32 + 52 + … + n2

5.     Write an object-oriented program in C++ to generate the following figures:

(i)                                                                                                                   (ii)

 9  98$      987$$     987$$$    987$$$$   987$$$$$  987$$$$$$ 987$$$$$$$987 * * * * * * * ! $ !****** $!$*****  !$!****   $!$******    !$!$!$!$!!$!  

$

$ $

$ $

$ $                                6

$ $                                6 5

$ $                                6 5 4

$ $                                6 5 4 3

$ $                                6 5 4 3 1

$ $                                6 5 4 3 2 1

(iii)                                                                          (iv)

* *                                $ ! $ ! $ !

* *                                ! $ ! $ !

* *                                $ ! $ !

* *                                ! $ !

* *                                $ !

* *                                !

* *

* *

*

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X