SlideShare a Scribd company logo
#include <stdio.h> longfactorial(int); intmain()
{
inti, n,c;
printf("Enterthe numberof rowsyouwishtosee inpascal trianglen");scanf("%d",&n); for(i = 0; i < n;
i++) { for(c = 0; c <= (n - i - 2); c++) printf(""); for(c = 0 ; c <= i; c++) printf("%ld
",factorial(i)/(factorial(c)*factorial(i-c))); printf("n");} return0; } longfactorial(intn) { intc; long
result= 1; for (c = 1; c <= n; c++) result= result*c; returnresult;}
hai

More Related Content

What's hot

Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-4Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-4
Dr. Loganathan R
ย 
Factorial
FactorialFactorial
Dfs implementation in c
Dfs implementation in cDfs implementation in c
Dfs implementation in c
HapPy SumOn
ย 
Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3
Dr. Loganathan R
ย 
Write a program to perform translation.
 Write a program to perform translation. Write a program to perform translation.
Write a program to perform translation.
Shobhit Saxena
ย 
Palindrome number program c
Palindrome number program cPalindrome number program c
Palindrome number program c
mohdshanu
ย 
week-10x
week-10xweek-10x
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3
Dr. Loganathan R
ย 
Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2
Dr. Loganathan R
ย 
Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9
alish sha
ย 
Include
IncludeInclude
Include
Angie Borda
ย 
Program presentation
Program presentationProgram presentation
Program presentation
MdAlauddinRidoy
ย 
Program for pyramid
Program for pyramidProgram for pyramid
Program for pyramid
nayakq
ย 
Boundary Fill Algorithm in C
Boundary Fill Algorithm in CBoundary Fill Algorithm in C
Boundary Fill Algorithm in C
Kasun Ranga Wijeweera
ย 
week-18x
week-18xweek-18x
Write a program to perform translation
Write a program to perform translationWrite a program to perform translation
Write a program to perform translation
Shobhit Saxena
ย 

What's hot (16)

Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-4Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-4
ย 
Factorial
FactorialFactorial
Factorial
ย 
Dfs implementation in c
Dfs implementation in cDfs implementation in c
Dfs implementation in c
ย 
Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3
ย 
Write a program to perform translation.
 Write a program to perform translation. Write a program to perform translation.
Write a program to perform translation.
ย 
Palindrome number program c
Palindrome number program cPalindrome number program c
Palindrome number program c
ย 
week-10x
week-10xweek-10x
week-10x
ย 
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3
ย 
Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2
ย 
Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9
ย 
Include
IncludeInclude
Include
ย 
Program presentation
Program presentationProgram presentation
Program presentation
ย 
Program for pyramid
Program for pyramidProgram for pyramid
Program for pyramid
ย 
Boundary Fill Algorithm in C
Boundary Fill Algorithm in CBoundary Fill Algorithm in C
Boundary Fill Algorithm in C
ย 
week-18x
week-18xweek-18x
week-18x
ย 
Write a program to perform translation
Write a program to perform translationWrite a program to perform translation
Write a program to perform translation
ย 

Viewers also liked

1 (1)
1 (1)1 (1)
1 (1)
Krish Na
ย 
1
11
1
Krish Na
ย 
ks1
ks1ks1
ks1
Krish Na
ย 
test slide
test slidetest slide
test slide
Krish Na
ย 
test slide
test slidetest slide
test slide
Krish Na
ย 
ks2
ks2ks2
ks2
Krish Na
ย 
Salesforce.com Org Migration Overview
Salesforce.com Org Migration OverviewSalesforce.com Org Migration Overview
Salesforce.com Org Migration Overview
Shell Black
ย 
Talking to Humans: The Art of Customer Discovery
Talking to Humans: The Art of Customer DiscoveryTalking to Humans: The Art of Customer Discovery
Talking to Humans: The Art of Customer Discovery
New York University
ย 
Global Technology Trends & Startup Hubs 2015
Global Technology Trends & Startup Hubs 2015Global Technology Trends & Startup Hubs 2015
Global Technology Trends & Startup Hubs 2015
Bernard Moon
ย 

Viewers also liked (9)

1 (1)
1 (1)1 (1)
1 (1)
ย 
1
11
1
ย 
ks1
ks1ks1
ks1
ย 
test slide
test slidetest slide
test slide
ย 
test slide
test slidetest slide
test slide
ย 
ks2
ks2ks2
ks2
ย 
Salesforce.com Org Migration Overview
Salesforce.com Org Migration OverviewSalesforce.com Org Migration Overview
Salesforce.com Org Migration Overview
ย 
Talking to Humans: The Art of Customer Discovery
Talking to Humans: The Art of Customer DiscoveryTalking to Humans: The Art of Customer Discovery
Talking to Humans: The Art of Customer Discovery
ย 
Global Technology Trends & Startup Hubs 2015
Global Technology Trends & Startup Hubs 2015Global Technology Trends & Startup Hubs 2015
Global Technology Trends & Startup Hubs 2015
ย 

More from Krish Na

jhg
jhgjhg
jhg
Krish Na
ย 
123
123123
123
Krish Na
ย 
test
testtest
test
Krish Na
ย 
ttttt
tttttttttt
ttttt
Krish Na
ย 
adasdadasdasd
adasdadasdasdadasdadasdasd
adasdadasdasd
Krish Na
ย 
2 pii (1) (1) (1)
2 pii (1) (1) (1)2 pii (1) (1) (1)
2 pii (1) (1) (1)
Krish Na
ย 
1 (1)
1 (1)1 (1)
1 (1)
Krish Na
ย 
2 pii (1) (1) (1) (2)
2 pii (1) (1) (1) (2)2 pii (1) (1) (1) (2)
2 pii (1) (1) (1) (2)
Krish Na
ย 
hai
haihai
hai
Krish Na
ย 
1 (2)
1 (2)1 (2)
1 (2)
Krish Na
ย 
1
11
1
Krish Na
ย 
test2
test2test2
test2
Krish Na
ย 
test1
test1test1
test1
Krish Na
ย 

More from Krish Na (13)

jhg
jhgjhg
jhg
ย 
123
123123
123
ย 
test
testtest
test
ย 
ttttt
tttttttttt
ttttt
ย 
adasdadasdasd
adasdadasdasdadasdadasdasd
adasdadasdasd
ย 
2 pii (1) (1) (1)
2 pii (1) (1) (1)2 pii (1) (1) (1)
2 pii (1) (1) (1)
ย 
1 (1)
1 (1)1 (1)
1 (1)
ย 
2 pii (1) (1) (1) (2)
2 pii (1) (1) (1) (2)2 pii (1) (1) (1) (2)
2 pii (1) (1) (1) (2)
ย 
hai
haihai
hai
ย 
1 (2)
1 (2)1 (2)
1 (2)
ย 
1
11
1
ย 
test2
test2test2
test2
ย 
test1
test1test1
test1
ย 

Recently uploaded

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
ย 
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Nguyen Thanh Tu Collection
ย 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
ย 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
ย 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
ย 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
ย 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
ย 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
ย 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
ย 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
ย 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
ย 
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
ย 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
ย 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
ย 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
ย 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
ย 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
ย 
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Nguyen Thanh Tu Collection
ย 

Recently uploaded (20)

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
ย 
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
ย 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
ย 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
ย 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
ย 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
ย 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
ย 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
ย 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
ย 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
ย 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
ย 
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
ย 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
ย 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
ย 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
ย 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
ย 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
ย 
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
ย 

1 (1)

  • 1. #include <stdio.h> longfactorial(int); intmain() { inti, n,c; printf("Enterthe numberof rowsyouwishtosee inpascal trianglen");scanf("%d",&n); for(i = 0; i < n; i++) { for(c = 0; c <= (n - i - 2); c++) printf(""); for(c = 0 ; c <= i; c++) printf("%ld ",factorial(i)/(factorial(c)*factorial(i-c))); printf("n");} return0; } longfactorial(intn) { intc; long result= 1; for (c = 1; c <= n; c++) result= result*c; returnresult;} hai