+ 1

How can I write this program in C++ language?

Write a program that takes the first term and the magnitude of the ratio of a geometric progression and then a) Calculate the sum M of the first sentence. Make sure that M is taken from the user b) Calculate the value of the sentence K. Pay attention that K is received from the user.

14th Oct 2022, 3:03 PM
Mhdis
Mhdis - avatar
2 Answers
+ 1
Schindlabua The sentence means the same number of numbers
15th Oct 2022, 4:30 PM
Mhdis
Mhdis - avatar
0
The geometric progression formula is `a * (1 - r^n) / (1 - r)`, where `a` is the initial term and `r` the ratio. I'm not sure what is meant by the word "sentence".
15th Oct 2022, 12:53 AM
Schindlabua
Schindlabua - avatar