Computer Science, asked by dimplepandey2089, 6 months ago

Take as input N, a number. Write a recursive function which prints counting from 1 to N in lexicographical
order. In lexicographical (dictionary) order 10, 100 and 109 will be printed before 11.
Input Format
Enter a number N.
Constraints
None
Output Format
Display all the numbers upto N in a lexicographical order
Sample Input
10
Sample Output
@ 1 10 2 3 4 5 6 7 8 9​

Answers

Answered by Ꚃhαtαkshi
15

Explanation:

\setlength{\unitlength}{1cm}\begin{picture}(0,0)\thicklines\qbezier (0,0)(0,0)(3,3)\qbezier (0,0)(0,0)(3,-3)\qbezier (0,0)(0,0)(-1,3.5)\qbezier (0,0)(0,0)(-1,-3.5)\put (3,3){\vector(1,1){0.2}}\put (3,-3){\vector (1,-1){0.2}}\put (-1,3.5){\vector(-1,3){0.2}}\put (-1,-3.5){\vector(-1,-3){0.2}}\put (0,0){\circle {1cm}}\put (-1.5,0){\sf $125{}^{\circ} $}\put (0,1){\sf $x {}^{\circ} $}\put (1,0){\sf $80 {}^{\circ} $}\put (0,-1){\sf  $85 {}^{\circ} $}\end {picture}

Answered by dipalinsonawane1999
0

Answer:

Explanation:

thanks

Similar questions