1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream> using namespace std; int factorialFinder(int x){ if(x==1){ return 1; }else{ return x*factorialFinder(x-1); } } int main() { cout << factorialFinder(5) << endl; } return 0; }
1 2
Line 18: error: expected unqualified-id before 'return' compilation terminated due to -Wfatal-errors.