Posts by Bruno Rodrigues • 135 points
2 posts
-
10
votes1
answer269
viewsQ: Difficulty in Syntax
I would like you to explain this function, I do not understand this syntax: double sum_arithmetic(double x0, double r, int n) { return n == 0 ? 0 : x0 + sum_arithmetic(x0 + r, r, n-1); }…
-
1
votes2
answers1183
viewsQ: Sum of squares
I’ve been doing a function to compute the sum of the first number (x0) with the ratio (r) by multiplying by a number (n) of times, like this function: double sum_arithmetic(double x0, double r, int…
casked Bruno Rodrigues 135