neither. Just two different versions of recursion. |
thanks.. but..
Oops.. My Bad.. It isn't Inheration and iteration, But Recursion and iteration..
So if my task is making two programs with Recursion and iteration each..
then, The Code above is Right about Recursion? thanks..
Last edited on
well, as I said. Just two recusions. I'd say that iteration means using loops (and maybe itarators) but both don't. So no iteration
can you give me sample codes? I am still beginner programmer.. so it is kinda hard for me to understand.. :)
Recursion is when a function contains calling itself under some circumstances.
Iteration is when a single piece of code (like functions) contain a loop to do calculation a given amount of times or when a condition is met.