Skip to content

Commit 72fabca

Browse files
authored
Merge pull request kelvins#176 from ricardocarva/Fatorial
Translated Factorial cpp
2 parents cb1070c + e2b1487 commit 72fabca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cpp/Fatorial.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <iostream>
22

3-
int fatorial(int n) {
3+
int factorial(int n) {
44

55
int fact = 1;
66
for (size_t i = 1; i <= n; i++) {
@@ -15,7 +15,7 @@ int main() {
1515
int nums[] = {0, 1, 2, 3, 4, 5};
1616

1717
for(auto i : nums) {
18-
std::cout << std::to_string(i)+"! = " << fatorial(i) << std::endl;
18+
std::cout << std::to_string(i)+"! = " << factorial(i) << std::endl;
1919
}
2020

2121
return 0;

0 commit comments

Comments
 (0)