Q:

pattern program 2 (C language)

belongs to collection: Pattern Programs in C

0

pattern program 2

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program - 2

/*C program to print following Pyramid:
*****
****
***
**
*
*/

#include<stdio.h>

#define MAX	5

int main()
{
	int i,j;

	for(i=MAX; i>=0; i--)
	{
		for(j=0;j<=i;j++)
		{
			printf("*");
		}
		printf("\n");
	}
    return 0;
}

Output

    *****
    ****
    ***
    **
    *

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

pattern program 3 (C language)... >>
<< pattern program 1 (C language)...