0% found this document useful (0 votes)
78 views1 page

#Include Int Main (Int I, J, Rows

This C program asks the user to input a number of rows. It then prints out a triangle pattern of asterisks using nested for loops, with each row containing one more asterisk than the previous row, up to the number entered by the user. The program returns 0 upon completion.

Uploaded by

Dinesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views1 page

#Include Int Main (Int I, J, Rows

This C program asks the user to input a number of rows. It then prints out a triangle pattern of asterisks using nested for loops, with each row containing one more asterisk than the previous row, up to the number entered by the user. The program returns 0 upon completion.

Uploaded by

Dinesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

#include <stdio.

h>

int main()

int i, j, rows;

printf("Enter number of rows: ");

scanf("%d",&rows);

for(i=1; i<=rows; ++i)

for(j=1; j<=i; ++j)

printf("* ");

printf("\n");

return 0;

You might also like