author | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-08-31 01:08:21 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-08-31 01:08:21 UTC |
parent | bd22451f2c5a20e1e669a81564e64eb1814533f3 |
binomial.cpp | +4 | -4 |
diff --git a/binomial.cpp b/binomial.cpp index bc4c0ad..2c0cc39 100644 --- a/binomial.cpp +++ b/binomial.cpp @@ -16,18 +16,18 @@ static double factorial(unsigned int n) int main(int argc, char *argv[]) { if (argc != 3) { - printf("Uso: %s <prec> <niters>\n", argv[0]); + printf("Uso: %s <prec> <nterm>\n", argv[0]); return 1; } int prec = atoi(argv[1]); - int niters = atoi(argv[2]); + int nterm = atoi(argv[2]); /* Valor inicial, el del primer término */ numero n(prec, 1); - /* Loop de la serie, niters términos */ - for (int i = 1; i <= niters; i++) { + /* Loop de la serie, nterm términos */ + for (int i = 1; i <= nterm; i++) { /* numerador: 1/2 (1/2 - 1) (1/2 - 2) ... * hasta (1/2 - i - 1) */