i) * * * * * * * * * * * * * * * * * * * * * #include <stdio.h> int main( void ) { int row,column; for (row=1;row<=6;row++) { for( column=1;column<=row;column++) { printf( "*" ); } printf( "\n" ); } return 0; } This C program prints a pattern resembling a right triangle with asterisks, where the number of asterisks in each row increases from 1 in the first row to 6 in the last row. It achieves this using nested loops: the outer loop controls the number of rows, and the inner loop determines the number of asterisks to print in each row. After printing the required number of asterisks in each row, a newline character is printed to move to the next row. Thus, the result is a right triangle pattern made of asterisks.
Comments
Post a Comment