Compare commits

..

No commits in common. "cd36eb3b66dda6266627381dd6883efb8b2bb4ce" and "2732ac4fb8d17fcfe72ecc7a6457d01bd07a42e4" have entirely different histories.

11
1.cpp
View File

@ -1,15 +1,4 @@
#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) {
return a + b;
}