mercredi 1 décembre 2021

Need a C++ implementation for summation

For calculating the sum of first n natural numbers, we have formula : n(n+1)/2. But how to calculate the n if we have that sum. I need that program in C++.

Aucun commentaire:

Enregistrer un commentaire