Write a C Program to Print the gives pattern using nested for loops.
/* It prints the pattern using nested for loops */
#include <stdio.h>
main()
{
int row, col, k = 1;
for ( row = 1; row <= 4; row++ )
{
for( col = 1; col <= row; col++ )
printf(" %d \t ", k++)
printf(" \n ");
}
}
1 Comments
in these articles you see how to " PRINT TRIANGLE PYRAMID " by Using For Loop
ReplyDeletehttp://allittechnologies.blogspot.in/2015/05/c-program-to-print-triangle-pyramid-by-using-for-loops.html