This is reverse pattern from the pattern which is explained
in last tutorial. In last tutorial patterns starts from ‘A’ and ends with
‘EEEE’. But here the pattern is reversed starting from ‘E’ to ‘AAAA’.
Pattern looks like as follows can be programmed as explain
below.
Here, just we need to change the conditions of for loops as
this pattern is reverse of last tutorial.
As we can seen in the program
for(i=k;i>=1;i--)
loop is decremented as we have to print first ‘A’ in the
last line.
Then inner loop is also reversed that is it is decremented
as
for(j=k;j>=i;j--)
This loop will print letters in reverse order from E to A.
{ 0 comments ... read them below or add one }
Post a Comment