Guest User

Untitled

a guest
Nov 17th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. // Cálculo ingenuo de una serie geométrica:
  2. int Calculo(int a, int r, int n) {
  3. int R = 1, S = 0;
  4. while(n--) {
  5. S += a * R;
  6. R *= r;
  7. }
  8. return S;
  9. }
Add Comment
Please, Sign In to add comment