Submit Search
Upload
Recursion and looping
•
Download as PPT, PDF
•
4 likes
•
2,776 views
X
xcoolanurag
Follow
A short comparison of iteration and recursion using example of factorial program.
Read less
Read more
Technology
Business
Report
Share
Report
Share
1 of 18
Download now
Recommended
Exception Handling in object oriented programming using C++
Exception Handling in object oriented programming using C++
Janki Shah
Delegates and events in C#
Delegates and events in C#
Dr.Neeraj Kumar Pandey
Control Flow Statements
Control Flow Statements
Tarun Sharma
Loops in c
Loops in c
baabtra.com - No. 1 supplier of quality freshers
Data structure and algorithm using java
Data structure and algorithm using java
Narayan Sau
If else statement in c++
If else statement in c++
Bishal Sharma
parameter passing in c#
parameter passing in c#
khush_boo31
Function in c program
Function in c program
umesh patil
Recommended
Exception Handling in object oriented programming using C++
Exception Handling in object oriented programming using C++
Janki Shah
Delegates and events in C#
Delegates and events in C#
Dr.Neeraj Kumar Pandey
Control Flow Statements
Control Flow Statements
Tarun Sharma
Loops in c
Loops in c
baabtra.com - No. 1 supplier of quality freshers
Data structure and algorithm using java
Data structure and algorithm using java
Narayan Sau
If else statement in c++
If else statement in c++
Bishal Sharma
parameter passing in c#
parameter passing in c#
khush_boo31
Function in c program
Function in c program
umesh patil
C functions
C functions
University of Potsdam
Object Oriented Paradigm
Object Oriented Paradigm
Hüseyin Ergin
Java interfaces
Java interfaces
Raja Sekhar
Call by value
Call by value
Dharani G
Loops in C
Loops in C
Kamal Acharya
OOP in C++
OOP in C++
ppd1961
Pointers, virtual function and polymorphism
Pointers, virtual function and polymorphism
lalithambiga kamaraj
virtual function
virtual function
VENNILAV6
Exception Handling in JAVA
Exception Handling in JAVA
SURIT DATTA
Control and conditional statements
Control and conditional statements
rajshreemuthiah
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Mohammad Ilyas Malik
While , For , Do-While Loop
While , For , Do-While Loop
Abhishek Choksi
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
Srimatre K
The Loops
The Loops
Krishma Parekh
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
03062679929
Passes of compilers
Passes of compilers
Vairavel C
Decision making statements in C programming
Decision making statements in C programming
Rabin BK
C++ Functions
C++ Functions
sathish sak
Inheritance in c++
Inheritance in c++
Vineeta Garg
Scope rules : local and global variables
Scope rules : local and global variables
sangrampatil81
Recursion
Recursion
Ashish Ranjan
Recursion in C++
Recursion in C++
Maliha Mehr
More Related Content
What's hot
C functions
C functions
University of Potsdam
Object Oriented Paradigm
Object Oriented Paradigm
Hüseyin Ergin
Java interfaces
Java interfaces
Raja Sekhar
Call by value
Call by value
Dharani G
Loops in C
Loops in C
Kamal Acharya
OOP in C++
OOP in C++
ppd1961
Pointers, virtual function and polymorphism
Pointers, virtual function and polymorphism
lalithambiga kamaraj
virtual function
virtual function
VENNILAV6
Exception Handling in JAVA
Exception Handling in JAVA
SURIT DATTA
Control and conditional statements
Control and conditional statements
rajshreemuthiah
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Mohammad Ilyas Malik
While , For , Do-While Loop
While , For , Do-While Loop
Abhishek Choksi
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
Srimatre K
The Loops
The Loops
Krishma Parekh
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
03062679929
Passes of compilers
Passes of compilers
Vairavel C
Decision making statements in C programming
Decision making statements in C programming
Rabin BK
C++ Functions
C++ Functions
sathish sak
Inheritance in c++
Inheritance in c++
Vineeta Garg
Scope rules : local and global variables
Scope rules : local and global variables
sangrampatil81
What's hot
(20)
C functions
C functions
Object Oriented Paradigm
Object Oriented Paradigm
Java interfaces
Java interfaces
Call by value
Call by value
Loops in C
Loops in C
OOP in C++
OOP in C++
Pointers, virtual function and polymorphism
Pointers, virtual function and polymorphism
virtual function
virtual function
Exception Handling in JAVA
Exception Handling in JAVA
Control and conditional statements
Control and conditional statements
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
While , For , Do-While Loop
While , For , Do-While Loop
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
The Loops
The Loops
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
Passes of compilers
Passes of compilers
Decision making statements in C programming
Decision making statements in C programming
C++ Functions
C++ Functions
Inheritance in c++
Inheritance in c++
Scope rules : local and global variables
Scope rules : local and global variables
Similar to Recursion and looping
Recursion
Recursion
Ashish Ranjan
Recursion in C++
Recursion in C++
Maliha Mehr
Unit-I Recursion.pptx
Unit-I Recursion.pptx
ajajkhan16
Lecture_7_StackAndRecursion (1).pptx
Lecture_7_StackAndRecursion (1).pptx
AbuHuraira729502
Model and Design
Model and Design
Dr Shashikant Athawale
Java script – basic auroskills (2)
Java script – basic auroskills (2)
BoneyGawande
Python recursion
Python recursion
ToniyaP1
Recursion vs. Iteration: Code Efficiency & Structure
Recursion vs. Iteration: Code Efficiency & Structure
cogaxor346
Recursion
Recursion
Jesmin Akhter
Data Structures- Part5 recursion
Data Structures- Part5 recursion
Abdullah Al-hazmy
Chapter 7 recursion handouts with notes
Chapter 7 recursion handouts with notes
mailund
2nd year computer science chapter 12 notes
2nd year computer science chapter 12 notes
muhammadFaheem656405
Python recursion
Python recursion
Prof. Dr. K. Adisesha
C++ chapter 4
C++ chapter 4
SHRIRANG PINJARKAR
35000120060_Nitesh Modi_CSE Presentation on recursion.pptx
35000120060_Nitesh Modi_CSE Presentation on recursion.pptx
15AnasKhan
recursive problem_solving
recursive problem_solving
Rajendran
2022-9-recursive-1.pptx
2022-9-recursive-1.pptx
RayLee547290
Introduction to Recursion
Introduction to Recursion
Mansoor Bahramand
Complexity Analysis of Recursive Function
Complexity Analysis of Recursive Function
Meghaj Mallick
Unit 3 principles of programming language
Unit 3 principles of programming language
Vasavi College of Engg
Similar to Recursion and looping
(20)
Recursion
Recursion
Recursion in C++
Recursion in C++
Unit-I Recursion.pptx
Unit-I Recursion.pptx
Lecture_7_StackAndRecursion (1).pptx
Lecture_7_StackAndRecursion (1).pptx
Model and Design
Model and Design
Java script – basic auroskills (2)
Java script – basic auroskills (2)
Python recursion
Python recursion
Recursion vs. Iteration: Code Efficiency & Structure
Recursion vs. Iteration: Code Efficiency & Structure
Recursion
Recursion
Data Structures- Part5 recursion
Data Structures- Part5 recursion
Chapter 7 recursion handouts with notes
Chapter 7 recursion handouts with notes
2nd year computer science chapter 12 notes
2nd year computer science chapter 12 notes
Python recursion
Python recursion
C++ chapter 4
C++ chapter 4
35000120060_Nitesh Modi_CSE Presentation on recursion.pptx
35000120060_Nitesh Modi_CSE Presentation on recursion.pptx
recursive problem_solving
recursive problem_solving
2022-9-recursive-1.pptx
2022-9-recursive-1.pptx
Introduction to Recursion
Introduction to Recursion
Complexity Analysis of Recursive Function
Complexity Analysis of Recursive Function
Unit 3 principles of programming language
Unit 3 principles of programming language
Recently uploaded
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
V3cube
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Roshan Dwivedi
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Recently uploaded
(20)
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Recursion and looping
1.
2.
3.
4.
5.
Syntax of loop(For):
For (initialise counter;test counter;increment counter) { statement 1; other statements; }
6.
7.
8.
9.
10.
General syntax: Function
definition(variable(s)) { variable declaration; condition1 base case; condition 2 recursive case; return(variable); }
11.
12.
Using For loop:
Int factorial (int n) { int f=1,i; for(i=n;i>=1;i--) f=f*i; return (f); }
13.
14.
Using recursion: Int
rec(int n) { int f; if(n==1) return (1); else f=n*rec(n-1); return (f); }
15.
16.
17.
18.
Download now