Compare commits
No commits in common. "cd36eb3b66dda6266627381dd6883efb8b2bb4ce" and "2732ac4fb8d17fcfe72ecc7a6457d01bd07a42e4" have entirely different histories.
cd36eb3b66
...
2732ac4fb8
11
1.cpp
11
1.cpp
@ -1,15 +1,4 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
int factorial(int n) {
|
|
||||||
return (n == 1 || n == 0) ? 1 : n * factorial(n - 1);
|
|
||||||
}
|
|
||||||
int main() {
|
|
||||||
int num;
|
|
||||||
std::cout << "Enter a number: ";
|
|
||||||
std::cin >> num;
|
|
||||||
std::cout << "Factorial: " << factorial(num) << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#include <iostream>
|
|
||||||
int sum(int a, int b) {
|
int sum(int a, int b) {
|
||||||
return a + b;
|
return a + b;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user