SAP interview question

How would you write a recursive function to write out number from 1 to 10

Interview Answer

Anonymous

17 Nov 2022

I would check if the number is 0 if not I would call the function with the number - 1 and then write then number.