SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9
alish sha
 
Program for pyramid
Program for pyramidProgram for pyramid
Program for pyramid
nayakq
 

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

Mru s7 studiu de caz
Mru   s7 studiu de cazMru   s7 studiu de caz
Mru s7 studiu de caz
alexino21
 

Viewers also liked (18)

Torneio 5
Torneio 5Torneio 5
Torneio 5
 
termo dinamica - Unidad 1 ejercicio 1 y 2
termo dinamica - Unidad 1 ejercicio 1 y 2termo dinamica - Unidad 1 ejercicio 1 y 2
termo dinamica - Unidad 1 ejercicio 1 y 2
 
The second great transformation
The second great transformationThe second great transformation
The second great transformation
 
Exercices pectoraux
Exercices pectorauxExercices pectoraux
Exercices pectoraux
 
Subir ppt o pdf al blog por slideshare
Subir ppt o pdf al blog por slideshareSubir ppt o pdf al blog por slideshare
Subir ppt o pdf al blog por slideshare
 
First tell no untruth: affirmative pluralism as the foundation of a civil eth...
First tell no untruth: affirmative pluralism as the foundation of a civil eth...First tell no untruth: affirmative pluralism as the foundation of a civil eth...
First tell no untruth: affirmative pluralism as the foundation of a civil eth...
 
Magic IQ Coat
Magic IQ CoatMagic IQ Coat
Magic IQ Coat
 
Presentation to Winnipeg Symphony Orchestra on the origin and nature of cultu...
Presentation to Winnipeg Symphony Orchestra on the origin and nature of cultu...Presentation to Winnipeg Symphony Orchestra on the origin and nature of cultu...
Presentation to Winnipeg Symphony Orchestra on the origin and nature of cultu...
 
Nano coatings great benefit or great risk - hidden danger behind nano coatings
Nano coatings   great benefit or great risk - hidden danger behind nano coatingsNano coatings   great benefit or great risk - hidden danger behind nano coatings
Nano coatings great benefit or great risk - hidden danger behind nano coatings
 
A marketing for amateurs - high jewelry
A marketing for amateurs -  high jewelryA marketing for amateurs -  high jewelry
A marketing for amateurs - high jewelry
 
Mru s7 studiu de caz
Mru   s7 studiu de cazMru   s7 studiu de caz
Mru s7 studiu de caz
 
How-to-play-Taiwan-server-LOL
How-to-play-Taiwan-server-LOLHow-to-play-Taiwan-server-LOL
How-to-play-Taiwan-server-LOL
 
The trouble with economics
The trouble with economicsThe trouble with economics
The trouble with economics
 
How-to-solve-the-problem-of-LOL-game-termination-overseas
How-to-solve-the-problem-of-LOL-game-termination-overseasHow-to-solve-the-problem-of-LOL-game-termination-overseas
How-to-solve-the-problem-of-LOL-game-termination-overseas
 
Comunicación 1°d
Comunicación 1°dComunicación 1°d
Comunicación 1°d
 
Freeletics Yogyakarta Profile
Freeletics Yogyakarta ProfileFreeletics Yogyakarta Profile
Freeletics Yogyakarta Profile
 
Project presentation - Filing Cabinet Project
Project presentation - Filing Cabinet ProjectProject presentation - Filing Cabinet Project
Project presentation - Filing Cabinet Project
 
International Marketing Plan - ETICS
International Marketing Plan - ETICS International Marketing Plan - ETICS
International Marketing Plan - ETICS
 

More from Krish Na (19)

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
 
ks2
ks2ks2
ks2
 
ks1
ks1ks1
ks1
 
test slide
test slidetest slide
test slide
 
test slide
test slidetest slide
test slide
 
1
11
1
 
1 (1)
1 (1)1 (1)
1 (1)
 

Recently uploaded

Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 

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