As in first tutorial we have seen that all
right angle triangle patterns can be form using same for loop structure, to
change patterns we just have to change printf statements in program.
Here in this program you will find how to
use characters to make print like
As you can see here the loop is same as
first pattern (pattern no-*1)
The only change is in printf statement
Here we print characters so we used “%c”,
‘A’-1+I = here A is work as predefine
starter or we can say default value, then as we want to print same character instead
of using j here we use i which follows first loop,
if you don’t want to use ‘A’-1+i you can use ‘@’+ i also u can use integer 64+i or 65+i-1
{ 0 comments ... read them below or add one }
Post a Comment