nope.2 questions (1 how you print the pattern which I displayed without using linq or sting built in. (2 how you write a code that takes any arithmetic expression and spits the result like input : 9*9-(9+2*9-2)-1 output : 55
Scan the line for ( first then can the same line for ) what ever is in the middle do it first... After the first scan take the new line generated and scan for * and / the numbers around it do, then replace those numbers with result and do it for - and + Then take the number calculated between ( ) and replace it with result and do the same for final line... recursion works best in this.
Обсуждают сегодня