alphacademy-cpp/quito/7.5.cpp

24 lines
440 B
C++
Raw Normal View History

2022-12-13 12:24:06 +00:00
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
// 7.5, 7.6 feladatok megoldasai
long long factorial (long long n) {
if (n==0) return 1;
return n * factorial(n-1);
}
int stringToInt (string n) {
if (n == "") return 0;
return (stringToInt(n.substr(0, n.size() -1)) * 10) + n.back() - '0' ;
}
int maximum(vector<int> v) {
}
int main () {
cout<<factorial(13);
cout<<endl<<stringToInt("7839");
}