We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
fold.expresion.cpp
1 parent a36b6b7 commit a41af3fCopy full SHA for a41af3f
1 file changed
exercises/2/fold.expresion.cpp
@@ -11,8 +11,8 @@
11
#include <iostream>
12
template<typename ... T>
13
auto average(T ... t) {
14
- return (t + ... ) / sizeof...(t);
+ return static_cast<double>((t + ... )) / sizeof...(t);
15
}
16
int main() {
17
std::cout << average(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) << std::endl;
18
-}
+}
0 commit comments