19th tutorial for right angle triangle patterns



This is very simple pattern which prints number in order. A very simple and easy to understand program.



In this pattern numbers are arranged in order such as 1 2 3 4 simple looks like:





Here both for loops remain same but printf statement changes.




As you can see loops are same as that of the first program. Here one more variable is taken to print the numbers by incrementing its value. Initially that variable is set to value of i.
Printf(“%d”, k++)

Here k is that variable and is incremented. Thus how series of integer numbers can be printed in right angle triangle form.


{ 0 comments ... read them below or add one }

Post a Comment