See, the recursive function has something called a base case. That is something that the recursive function knows what to do with and can stop recursing. So in this case our base case is that if the count is equal to ten then the function will return, therefore returning to the previous function. That in turn returns to the function it was called from up till the top one. But if it does not match the base case we print our new result and continue with recursion.
Hope that helps
EDIT: I made it 100.0 so that it would use decimal places where necessary.
write a C++ program which take inputs from the user/keyboard and calculate his ZAKAT.
get the input from user may include
-Amount invested in business
-Amount given to other business partners as loan
-Amount payable to others
I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.)
Made this in cpp.sh
Why would I need the x=y+1-1;?
x=y; just doesnt seem to work
Why is this?
And I know my coding ...