SlideShare una empresa de Scribd logo
1 de 14
C language Pattern Print
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
Sourav Ganguly
Please visit my Youtube channel
Step 1: go to www.google.com
Step 2: Search for “sourav ganguly c programming”.
Step 3: Click on my image bottom of the video. You will reach my
channel.
Youtube (direct link):
https://www.youtube.com/channel/UCDsQskBhM107VIYLjg8kczg
Website:
http://www.startselfstudy.blogspot.in
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
What is pattern of C language…..
Different types of pattern in C language…..
Secret of pattern printing in C language…..
Discover the secret of pattern printing …..
How print pattern with loops in C language…..
Pattern printing example with real program…..
[Live Demo on YouTube channel]
Index
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
***
*****
*******
*******
*****
***
*
When we display something with some special order then it is
called pattern.
What is pattern of C language…..
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
**
***
****
@
@@
@@@
@@@@
$$$$
$$$
$$
$
####
###
##
#
****
****
****
****
!
!!!
!!!!!
!!!!!!!
&&&&&&&
&&&&&
&&&
&
*****
*
*
*****
Different types of pattern in C language…..
Secret of pattern printing in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
Computer
Screen
Column
1
Column
2
Column
3
Column
4
Row
1
Row
2
Row
3
Row
4
Raster Scan Display
Row 1
Column 1
Secret of pattern printing in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* *
* * *
* * * *
Computer
Screen
Column
1
Column
2
Column
3
Column
4
Row
1
Row
2
Row
3
Row
4
Space -> printf(“ ”);
Symbol -> printf(“*”);
Next line -> printf(“n”);
Discover the secret of pattern printing …..
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* *
* * *
* * * *
Computer
Screen
Column
1
Column
2
Column
3
Column
4
Row
1
Row
2
Row
3
Row
4
Row
No.
Space
No.
Star
No.
Total
Row
1 3 1 4
2 2 2 4
3 1 3 4
4 0 4 4
Write this table.
Calculate the relation.
Relation:
Space No = (Total Row – Row No)
Star No = Row No
How print pattern with loops in C language…..contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* *
* * *
* * * *
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(4-row) ; space=space+1)
{
printf(" ");
}
for(star=1 ; star<=row ; star=star+1)
{
printf("*");
}
printf("n");
}
How print pattern with loops in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* *
* * *
* * * *
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(4-row) ; space=space+1)
{
printf(" ");
}
for(star=1 ; star<=row ; star=star+1)
{
printf("*");
}
printf("n");
}
Row
No.
Space
No.
Star
No.
Total
Row
1 0 1 4
2 0 2 4
3 0 3 4
4 0 4 4
Relation:
Space No = 0
Star No = Row No
How print pattern with loops in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
* * * *
* * *
* *
*
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(4-row) ; space=space+1)
{
printf(" ");
}
for(star=4 ; star>=row ; star=star-1)
{
printf("*");
}
printf("n");
}
Row
No.
Space
No.
Star
No.
Total
Row
1 0 4 4
2 0 3 4
3 0 2 4
4 0 1 4
Relation:
Space No = 0
Star No = Row No (reverse order)
How print pattern with loops in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
* * * *
* * *
* *
*
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(row-1) ; space=space+1)
{
printf(" ");
}
for(star=4 ; star>=row ; star=star-1)
{
printf("*");
}
printf("n");
}
Row
No.
Space
No.
Star
No.
Total
Row
1 0 4 4
2 1 3 4
3 2 2 4
4 3 1 4
Relation:
Space No = (Row No – 1)
Star No = Row No (reverse order)
How print pattern with loops in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* * *
* * * * *
* * * * * * *
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(4-row) ; space=space+1)
{
printf(" ");
}
for(star=1 ; star>=((row*2)-1) ; star=star+1)
{
printf("*");
}
printf("n");
}
Row
No.
Space
No.
Star
No.
Total
Row
1 3 1 4
2 2 3 4
3 1 5 4
4 0 7 4
Relation:
Space No = (Total Row - Row No)
Star No = ((Row No * 2) -1)
Sourav Ganguly
Please visit my Youtube channel
Step 1: go to www.google.com
Step 2: Search for “sourav ganguly c programming”.
Step 3: Click on my image bottom of the video. You will reach my
channel.
Youtube (direct link):
https://www.youtube.com/channel/UCDsQskBhM107VIYLjg8kczg
Website:
http://www.startselfstudy.blogspot.in
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.

Más contenido relacionado

La actualidad más candente

Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming LanguageMahantesh Devoor
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in clavanya marichamy
 
Type casting in c programming
Type casting in c programmingType casting in c programming
Type casting in c programmingRumman Ansari
 
Input output statement in C
Input output statement in CInput output statement in C
Input output statement in CMuthuganesh S
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILEDipta Saha
 
Looping statement in python
Looping statement in pythonLooping statement in python
Looping statement in pythonRaginiJain21
 
Data Structures Practical File
Data Structures Practical File Data Structures Practical File
Data Structures Practical File Harjinder Singh
 
C programming - Pointers
C programming - PointersC programming - Pointers
C programming - PointersWingston
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C v_jk
 
Pointers in c - Mohammad Salman
Pointers in c - Mohammad SalmanPointers in c - Mohammad Salman
Pointers in c - Mohammad SalmanMohammadSalman129
 
Types of loops in c language
Types of loops in c languageTypes of loops in c language
Types of loops in c languagesneha2494
 
Loop(for, while, do while) condition Presentation
Loop(for, while, do while) condition PresentationLoop(for, while, do while) condition Presentation
Loop(for, while, do while) condition PresentationBadrul Alam
 
String in c programming
String in c programmingString in c programming
String in c programmingDevan Thakur
 

La actualidad más candente (20)

Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming Language
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
 
Functions in C
Functions in CFunctions in C
Functions in C
 
Type casting in c programming
Type casting in c programmingType casting in c programming
Type casting in c programming
 
Input output statement in C
Input output statement in CInput output statement in C
Input output statement in C
 
Enums in c
Enums in cEnums in c
Enums in c
 
C introduction by thooyavan
C introduction by  thooyavanC introduction by  thooyavan
C introduction by thooyavan
 
Unit 3. Input and Output
Unit 3. Input and OutputUnit 3. Input and Output
Unit 3. Input and Output
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
Identifiers
Identifiers Identifiers
Identifiers
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 
Looping statement in python
Looping statement in pythonLooping statement in python
Looping statement in python
 
Data Structures Practical File
Data Structures Practical File Data Structures Practical File
Data Structures Practical File
 
C programming - Pointers
C programming - PointersC programming - Pointers
C programming - Pointers
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
 
Pointers in c - Mohammad Salman
Pointers in c - Mohammad SalmanPointers in c - Mohammad Salman
Pointers in c - Mohammad Salman
 
Branching in C
Branching in CBranching in C
Branching in C
 
Types of loops in c language
Types of loops in c languageTypes of loops in c language
Types of loops in c language
 
Loop(for, while, do while) condition Presentation
Loop(for, while, do while) condition PresentationLoop(for, while, do while) condition Presentation
Loop(for, while, do while) condition Presentation
 
String in c programming
String in c programmingString in c programming
String in c programming
 

Destacado

How to write c program with code blocks
How to write c program with code blocksHow to write c program with code blocks
How to write c program with code blocksSourav Ganguly
 
C programming language character set keywords constants variables data types
C programming language character set keywords constants variables data typesC programming language character set keywords constants variables data types
C programming language character set keywords constants variables data typesSourav Ganguly
 
Reede for integrated POP display
Reede for  integrated POP displayReede for  integrated POP display
Reede for integrated POP displayKaren Chen
 
ศิลป์ ทวารวดี ศรีวิชัย ลพบุรี
ศิลป์ ทวารวดี ศรีวิชัย ลพบุรีศิลป์ ทวารวดี ศรีวิชัย ลพบุรี
ศิลป์ ทวารวดี ศรีวิชัย ลพบุรีPattharapong Sirisuwan
 
Classroom management approaches and Theories and models of classroom management
Classroom management approaches and Theories and models of classroom managementClassroom management approaches and Theories and models of classroom management
Classroom management approaches and Theories and models of classroom managementyusnithamerang
 
Facultad de ingenieria de sistemas uniremignton engenier 2010
Facultad de ingenieria de sistemas uniremignton engenier 2010Facultad de ingenieria de sistemas uniremignton engenier 2010
Facultad de ingenieria de sistemas uniremignton engenier 2010Miguel Angel Guevara
 
RAKESH_KUMAR_ANGURAL_14Sep2015(long)
RAKESH_KUMAR_ANGURAL_14Sep2015(long)RAKESH_KUMAR_ANGURAL_14Sep2015(long)
RAKESH_KUMAR_ANGURAL_14Sep2015(long)Rakesh Angural
 
William Professional Resume
William Professional ResumeWilliam Professional Resume
William Professional ResumeWilliam Bullock
 
Top7ReasonsPreventativeMaintenanceCity
Top7ReasonsPreventativeMaintenanceCityTop7ReasonsPreventativeMaintenanceCity
Top7ReasonsPreventativeMaintenanceCityAlecia Flahiff
 
y-HR-Loama - LinkedIn
y-HR-Loama - LinkedIny-HR-Loama - LinkedIn
y-HR-Loama - LinkedInEmad Qabbani
 

Destacado (15)

CV[1]
CV[1]CV[1]
CV[1]
 
How to write c program with code blocks
How to write c program with code blocksHow to write c program with code blocks
How to write c program with code blocks
 
OpenWare ThinkGIS
OpenWare ThinkGISOpenWare ThinkGIS
OpenWare ThinkGIS
 
C programming language character set keywords constants variables data types
C programming language character set keywords constants variables data typesC programming language character set keywords constants variables data types
C programming language character set keywords constants variables data types
 
Reede for integrated POP display
Reede for  integrated POP displayReede for  integrated POP display
Reede for integrated POP display
 
سورة يوسف دراسة تحليلية
سورة يوسف دراسة تحليليةسورة يوسف دراسة تحليلية
سورة يوسف دراسة تحليلية
 
ศิลป์ ทวารวดี ศรีวิชัย ลพบุรี
ศิลป์ ทวารวดี ศรีวิชัย ลพบุรีศิลป์ ทวารวดี ศรีวิชัย ลพบุรี
ศิลป์ ทวารวดี ศรีวิชัย ลพบุรี
 
Classroom management approaches and Theories and models of classroom management
Classroom management approaches and Theories and models of classroom managementClassroom management approaches and Theories and models of classroom management
Classroom management approaches and Theories and models of classroom management
 
Facultad de ingenieria de sistemas uniremignton engenier 2010
Facultad de ingenieria de sistemas uniremignton engenier 2010Facultad de ingenieria de sistemas uniremignton engenier 2010
Facultad de ingenieria de sistemas uniremignton engenier 2010
 
رضا مصطفوی طباطبایی
رضا مصطفوی طباطباییرضا مصطفوی طباطبایی
رضا مصطفوی طباطبایی
 
RAKESH_KUMAR_ANGURAL_14Sep2015(long)
RAKESH_KUMAR_ANGURAL_14Sep2015(long)RAKESH_KUMAR_ANGURAL_14Sep2015(long)
RAKESH_KUMAR_ANGURAL_14Sep2015(long)
 
William Professional Resume
William Professional ResumeWilliam Professional Resume
William Professional Resume
 
Top7ReasonsPreventativeMaintenanceCity
Top7ReasonsPreventativeMaintenanceCityTop7ReasonsPreventativeMaintenanceCity
Top7ReasonsPreventativeMaintenanceCity
 
Estadisticas veredal 6
Estadisticas veredal 6Estadisticas veredal 6
Estadisticas veredal 6
 
y-HR-Loama - LinkedIn
y-HR-Loama - LinkedIny-HR-Loama - LinkedIn
y-HR-Loama - LinkedIn
 

Similar a C program language tutorial pattern printing

C program language tutorial for loop while loop do while loop
C program language tutorial for loop while loop do while loopC program language tutorial for loop while loop do while loop
C program language tutorial for loop while loop do while loopSourav Ganguly
 
Arduino programming of ML-style in ATS
Arduino programming of ML-style in ATSArduino programming of ML-style in ATS
Arduino programming of ML-style in ATSKiwamu Okabe
 
Python for High School Programmers
Python for High School ProgrammersPython for High School Programmers
Python for High School ProgrammersSiva Arunachalam
 
Simple c program
Simple c programSimple c program
Simple c programRavi Singh
 
Being Expressive in Code
Being Expressive in CodeBeing Expressive in Code
Being Expressive in CodeEamonn Boyle
 
Python Peculiarities
Python PeculiaritiesPython Peculiarities
Python Peculiaritiesnoamt
 
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014]
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014][Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014]
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014]Mumbai B.Sc.IT Study
 
A CTF Hackers Toolbox
A CTF Hackers ToolboxA CTF Hackers Toolbox
A CTF Hackers ToolboxStefan
 
C programing Tutorial
C programing TutorialC programing Tutorial
C programing TutorialMahira Banu
 
Python for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo CruzPython for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo Cruzrpmcruz
 
Introduction to programming - class 11
Introduction to programming - class 11Introduction to programming - class 11
Introduction to programming - class 11Paul Brebner
 
Koreanizer : Statistical Machine Translation based Ro-Ko Transliterator
Koreanizer : Statistical Machine Translation based Ro-Ko TransliteratorKoreanizer : Statistical Machine Translation based Ro-Ko Transliterator
Koreanizer : Statistical Machine Translation based Ro-Ko TransliteratorHONGJOO LEE
 

Similar a C program language tutorial pattern printing (20)

C program language tutorial for loop while loop do while loop
C program language tutorial for loop while loop do while loopC program language tutorial for loop while loop do while loop
C program language tutorial for loop while loop do while loop
 
Arduino programming of ML-style in ATS
Arduino programming of ML-style in ATSArduino programming of ML-style in ATS
Arduino programming of ML-style in ATS
 
Kotlin
KotlinKotlin
Kotlin
 
Python for High School Programmers
Python for High School ProgrammersPython for High School Programmers
Python for High School Programmers
 
Simple c program
Simple c programSimple c program
Simple c program
 
C SLIDES PREPARED BY M V B REDDY
C SLIDES PREPARED BY  M V B REDDYC SLIDES PREPARED BY  M V B REDDY
C SLIDES PREPARED BY M V B REDDY
 
pattern-printing-in-c.pdf
pattern-printing-in-c.pdfpattern-printing-in-c.pdf
pattern-printing-in-c.pdf
 
Being Expressive in Code
Being Expressive in CodeBeing Expressive in Code
Being Expressive in Code
 
Python Peculiarities
Python PeculiaritiesPython Peculiarities
Python Peculiarities
 
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014]
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014][Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014]
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014]
 
A CTF Hackers Toolbox
A CTF Hackers ToolboxA CTF Hackers Toolbox
A CTF Hackers Toolbox
 
Stars
StarsStars
Stars
 
CP Handout#5
CP Handout#5CP Handout#5
CP Handout#5
 
C programing Tutorial
C programing TutorialC programing Tutorial
C programing Tutorial
 
Loops in Python.pptx
Loops in Python.pptxLoops in Python.pptx
Loops in Python.pptx
 
Python for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo CruzPython for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo Cruz
 
Pslb lab manual
Pslb lab manualPslb lab manual
Pslb lab manual
 
Introduction to programming - class 11
Introduction to programming - class 11Introduction to programming - class 11
Introduction to programming - class 11
 
Music as data
Music as dataMusic as data
Music as data
 
Koreanizer : Statistical Machine Translation based Ro-Ko Transliterator
Koreanizer : Statistical Machine Translation based Ro-Ko TransliteratorKoreanizer : Statistical Machine Translation based Ro-Ko Transliterator
Koreanizer : Statistical Machine Translation based Ro-Ko Transliterator
 

Último

How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17Celine George
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphNetziValdelomar1
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationMJDuyan
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17Celine George
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxKatherine Villaluna
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxheathfieldcps1
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?TechSoup
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
How to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesHow to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesCeline George
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational PhilosophyShuvankar Madhu
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfMohonDas
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 

Último (20)

How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a Paragraph
 
Finals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quizFinals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quiz
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive Education
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
How to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesHow to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 Sales
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational Philosophy
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdf
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 

C program language tutorial pattern printing

  • 1. C language Pattern Print Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
  • 2. Sourav Ganguly Please visit my Youtube channel Step 1: go to www.google.com Step 2: Search for “sourav ganguly c programming”. Step 3: Click on my image bottom of the video. You will reach my channel. Youtube (direct link): https://www.youtube.com/channel/UCDsQskBhM107VIYLjg8kczg Website: http://www.startselfstudy.blogspot.in Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
  • 3. What is pattern of C language….. Different types of pattern in C language….. Secret of pattern printing in C language….. Discover the secret of pattern printing ….. How print pattern with loops in C language….. Pattern printing example with real program….. [Live Demo on YouTube channel] Index Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
  • 4. Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * *** ***** ******* ******* ***** *** * When we display something with some special order then it is called pattern. What is pattern of C language…..
  • 5. Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * ** *** **** @ @@ @@@ @@@@ $$$$ $$$ $$ $ #### ### ## # **** **** **** **** ! !!! !!!!! !!!!!!! &&&&&&& &&&&& &&& & ***** * * ***** Different types of pattern in C language…..
  • 6. Secret of pattern printing in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. Computer Screen Column 1 Column 2 Column 3 Column 4 Row 1 Row 2 Row 3 Row 4 Raster Scan Display Row 1 Column 1
  • 7. Secret of pattern printing in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * Computer Screen Column 1 Column 2 Column 3 Column 4 Row 1 Row 2 Row 3 Row 4 Space -> printf(“ ”); Symbol -> printf(“*”); Next line -> printf(“n”);
  • 8. Discover the secret of pattern printing ….. Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * Computer Screen Column 1 Column 2 Column 3 Column 4 Row 1 Row 2 Row 3 Row 4 Row No. Space No. Star No. Total Row 1 3 1 4 2 2 2 4 3 1 3 4 4 0 4 4 Write this table. Calculate the relation. Relation: Space No = (Total Row – Row No) Star No = Row No
  • 9. How print pattern with loops in C language…..contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(4-row) ; space=space+1) { printf(" "); } for(star=1 ; star<=row ; star=star+1) { printf("*"); } printf("n"); }
  • 10. How print pattern with loops in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(4-row) ; space=space+1) { printf(" "); } for(star=1 ; star<=row ; star=star+1) { printf("*"); } printf("n"); } Row No. Space No. Star No. Total Row 1 0 1 4 2 0 2 4 3 0 3 4 4 0 4 4 Relation: Space No = 0 Star No = Row No
  • 11. How print pattern with loops in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(4-row) ; space=space+1) { printf(" "); } for(star=4 ; star>=row ; star=star-1) { printf("*"); } printf("n"); } Row No. Space No. Star No. Total Row 1 0 4 4 2 0 3 4 3 0 2 4 4 0 1 4 Relation: Space No = 0 Star No = Row No (reverse order)
  • 12. How print pattern with loops in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(row-1) ; space=space+1) { printf(" "); } for(star=4 ; star>=row ; star=star-1) { printf("*"); } printf("n"); } Row No. Space No. Star No. Total Row 1 0 4 4 2 1 3 4 3 2 2 4 4 3 1 4 Relation: Space No = (Row No – 1) Star No = Row No (reverse order)
  • 13. How print pattern with loops in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(4-row) ; space=space+1) { printf(" "); } for(star=1 ; star>=((row*2)-1) ; star=star+1) { printf("*"); } printf("n"); } Row No. Space No. Star No. Total Row 1 3 1 4 2 2 3 4 3 1 5 4 4 0 7 4 Relation: Space No = (Total Row - Row No) Star No = ((Row No * 2) -1)
  • 14. Sourav Ganguly Please visit my Youtube channel Step 1: go to www.google.com Step 2: Search for “sourav ganguly c programming”. Step 3: Click on my image bottom of the video. You will reach my channel. Youtube (direct link): https://www.youtube.com/channel/UCDsQskBhM107VIYLjg8kczg Website: http://www.startselfstudy.blogspot.in Copyright © 2015 · Sourav Ganguly · All Rights Reserved.