Program to print numbers from N to 1 in reverse order | Recursive function to print from N to 1 ; if N is less than 1 then return void function ; recursive call of the function ; Driver Code
def PrintReverseOrder ( N ) : NEW_LINE INDENT if ( N <= 0 ) : NEW_LINE INDENT return ; NEW_LINE DEDENT else : NEW_LINE INDENT print ( N , end = " ▁ " ) ; NEW_LINE PrintReverseOrder ( N - 1 ) ; NEW_LINE DEDENT DEDENT N = 5 ; NEW_LINE PrintReverseOrder ( N ) ; NEW_LINE