1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
long fact(int);
int main()
{
int i, j;
for (i=0;i<5;i++)
{
for(j=0;j<=i;j++)
{
printf("%ld ",fact(i)/(fact(j)*fact(i-j)));
}
printf("\n");
}
return 0;
}
long fact(int n)
{
int i;
long f = 1;
for(i=1;i<=n;i++)
f = f*i;
return f;
}
Related Links:
- More Number Pattern Programs
- Star Pattern Programs in C
- Alphabet Pattern Programs in C
- Series Programs in C
#include
ReplyDeletevoid main()
{
int i,num=1;
for(i=1;i<=5;i++)
{
printf("%d",num);
num=num*11;
printf("\n");
}
}
good observation
DeleteTHE SAME PATTERN IS PRINTED 5 TIME. WHY???
DeleteSRY IT WAS MY MISTAKE I FOUND IT
Deletedude Soumya Sourav ....wrong observation in 6th iteration
DeleteAttention everyone, the file provided above is not working. I have been looking for the working file and finally found it.
Delete✔️Click Here To Download http://gestyy.com/e0GAyS
✔️Click Here To Download
✔️Click Here To Download http://exe.io/XONVsO6l
✔️Click Here To Download
✔️Click Here To Download
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Mn.
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.xzzx
.sdcccxxx
public class PascalTriangle {
ReplyDeletepublic static void main(String[] args) {
int rows = 10;
for(int i =0;i<rows;i++) {
int number = 1;
System.out.format("%"+(rows-i)*2+"s","");
for(int j=0;j<=i;j++) {
System.out.format("%4d",number);
number = number * (i - j) / (j + 1);
}
System.out.println();
}
}
}
int i,j,k,b,m=1;
ReplyDeleteint mul(int);
int main()
{
for(i=1;i<=5;i++)
{
printf("%d",m);
mul(m);
printf("\n");
}
}
int mul(int i)
{
m=m*11;
return m;
}
#include
ReplyDeleteint main()
{
int rows, coef = 1, i, j;
printf("Enter number of rows: ")
scanf("%d",&rows);
for(i=0; i<rows; i++)
{
for(j=0; j <= i; j++)
{
if (j==0 || i==0)
coef = 1;
else
coef = coef*(i-j+1)/
printf("%4d", coef);
}
Really Good Code there!
ReplyDeleteThis comment has been removed by the author.
ReplyDelete0
ReplyDelete11
112
1123
11235
pls tell about this
1
ReplyDelete1 1
1 2 1
1 2 3 1
1 2 3 4 1
1 2 3 4 5 1
Please help me for this
2
ReplyDelete2 5
2 5 10
2 5 10 17
what is the program of this pattern
Really nice blog, very infromative. You can refer more topics related to C language like C pointers and C Programs from here for future articles
ReplyDeleteThis comment has been removed by the author.
ReplyDelete<a href="https://saivi.optisolbusiness.com/Data Scraping Service available in USA </a>
ReplyDeleteData Aggregration Services
ReplyDelete