Pattern Output:
abcdef
abcde
abce
abc
ab
a
We will use 2 for Loops and use a Variable 'ch' of char Data type and store 'a' in it as the loop will progress/increment the value of a will increase in the internal loop and as the internal loops break the program will come out of internal loop and the value of variable will be again become 'a'. we also have added Console.WriteLine(); to change the Line as the internal Loop gets over and we come out to External loop.
Output:
Post a Comment