+ 2
I need some project ideas that can be possible using C++.
I need more than 20 project ideas to distribute among my students. Can anyone help me?
2 Answers
+ 19
write a function named factorial, which returns a an integer and gets an integer.
i.e. the user use factorial(5)
the function returns (1*2*3*4*5) = 120
they should use a reverse solution.
int factorial(int num){
if (num == 1)
return 1;
else
return num *= factorial(num - 1);
}