SlideShare a Scribd company logo
Write functions to calculate the N-th Fibonacci number in java
Use iterative method
Use recursive method
c) Run program (a) for =10000,100000; program (b) for n=1000,10000
d) Compare the actual running times.

More Related Content

More from aaryanentp

You have recently joined the accounting firm Comtois Benoit.pdf
You have recently joined the accounting firm Comtois Benoit.pdfYou have recently joined the accounting firm Comtois Benoit.pdf
You have recently joined the accounting firm Comtois Benoit.pdf
aaryanentp
 
You have three alternatives to invest A1 Stocks A2 Bond.pdf
You have three alternatives to invest A1 Stocks A2  Bond.pdfYou have three alternatives to invest A1 Stocks A2  Bond.pdf
You have three alternatives to invest A1 Stocks A2 Bond.pdf
aaryanentp
 
You have helped authors develop a number of figures and tabl.pdf
You have helped authors develop a number of figures and tabl.pdfYou have helped authors develop a number of figures and tabl.pdf
You have helped authors develop a number of figures and tabl.pdf
aaryanentp
 
You know that most people use someones birthday as the 4di.pdf
You know that most people use someones birthday as the 4di.pdfYou know that most people use someones birthday as the 4di.pdf
You know that most people use someones birthday as the 4di.pdf
aaryanentp
 
You have come onto the unit after report You are required t.pdf
You have come onto the unit after report You are required t.pdfYou have come onto the unit after report You are required t.pdf
You have come onto the unit after report You are required t.pdf
aaryanentp
 
you have a portfolio consisting solely of Stock A and Stock .pdf
you have a portfolio consisting solely of Stock A and Stock .pdfyou have a portfolio consisting solely of Stock A and Stock .pdf
you have a portfolio consisting solely of Stock A and Stock .pdf
aaryanentp
 
You are designing an application that allows users to input .pdf
You are designing an application that allows users to input .pdfYou are designing an application that allows users to input .pdf
You are designing an application that allows users to input .pdf
aaryanentp
 
You are required to present a research report in which you h.pdf
You are required to present a research report in which you h.pdfYou are required to present a research report in which you h.pdf
You are required to present a research report in which you h.pdf
aaryanentp
 
You are at a professional association reception and you are.pdf
You are at a professional association reception and you are.pdfYou are at a professional association reception and you are.pdf
You are at a professional association reception and you are.pdf
aaryanentp
 
You are a senior manager in an industry of your choosing Se.pdf
You are a senior manager in an industry of your choosing Se.pdfYou are a senior manager in an industry of your choosing Se.pdf
You are a senior manager in an industry of your choosing Se.pdf
aaryanentp
 
yi bir etki lm stratejisi SElerin alar etrafndaki potan.pdf
yi bir etki lm stratejisi SElerin alar etrafndaki potan.pdfyi bir etki lm stratejisi SElerin alar etrafndaki potan.pdf
yi bir etki lm stratejisi SElerin alar etrafndaki potan.pdf
aaryanentp
 
write the precis of the following passage and give suitable .pdf
write the precis of the following passage and give suitable .pdfwrite the precis of the following passage and give suitable .pdf
write the precis of the following passage and give suitable .pdf
aaryanentp
 
Yeni bir elektronik para tr olan Bitcoini bir deiim arac .pdf
Yeni bir elektronik para tr olan Bitcoini bir deiim arac .pdfYeni bir elektronik para tr olan Bitcoini bir deiim arac .pdf
Yeni bir elektronik para tr olan Bitcoini bir deiim arac .pdf
aaryanentp
 
You are a financial planner with a specialty in risk managem.pdf
You are a financial planner with a specialty in risk managem.pdfYou are a financial planner with a specialty in risk managem.pdf
You are a financial planner with a specialty in risk managem.pdf
aaryanentp
 
write the code for Part 1 ContextFree Grammars Create con.pdf
write the code for Part 1  ContextFree Grammars Create con.pdfwrite the code for Part 1  ContextFree Grammars Create con.pdf
write the code for Part 1 ContextFree Grammars Create con.pdf
aaryanentp
 
Xin 037 ile stel olarak dalm bir rasgele deiken oldu.pdf
Xin    037 ile stel olarak dalm bir rasgele deiken oldu.pdfXin    037 ile stel olarak dalm bir rasgele deiken oldu.pdf
Xin 037 ile stel olarak dalm bir rasgele deiken oldu.pdf
aaryanentp
 
Write a parallel program using MPI and not OpeMP to accomp.pdf
Write a parallel program using MPI and not OpeMP to accomp.pdfWrite a parallel program using MPI and not OpeMP to accomp.pdf
Write a parallel program using MPI and not OpeMP to accomp.pdf
aaryanentp
 
Write an MPI program to accomplish the following for a numbe.pdf
Write an MPI program to accomplish the following for a numbe.pdfWrite an MPI program to accomplish the following for a numbe.pdf
Write an MPI program to accomplish the following for a numbe.pdf
aaryanentp
 
write a precis of the following passage and give a suitable .pdf
write a precis of the following passage and give a suitable .pdfwrite a precis of the following passage and give a suitable .pdf
write a precis of the following passage and give a suitable .pdf
aaryanentp
 
x Banquet Ballyhoo at the Brunswick The annual members me.pdf
x Banquet Ballyhoo at the Brunswick   The annual members me.pdfx Banquet Ballyhoo at the Brunswick   The annual members me.pdf
x Banquet Ballyhoo at the Brunswick The annual members me.pdf
aaryanentp
 

More from aaryanentp (20)

You have recently joined the accounting firm Comtois Benoit.pdf
You have recently joined the accounting firm Comtois Benoit.pdfYou have recently joined the accounting firm Comtois Benoit.pdf
You have recently joined the accounting firm Comtois Benoit.pdf
 
You have three alternatives to invest A1 Stocks A2 Bond.pdf
You have three alternatives to invest A1 Stocks A2  Bond.pdfYou have three alternatives to invest A1 Stocks A2  Bond.pdf
You have three alternatives to invest A1 Stocks A2 Bond.pdf
 
You have helped authors develop a number of figures and tabl.pdf
You have helped authors develop a number of figures and tabl.pdfYou have helped authors develop a number of figures and tabl.pdf
You have helped authors develop a number of figures and tabl.pdf
 
You know that most people use someones birthday as the 4di.pdf
You know that most people use someones birthday as the 4di.pdfYou know that most people use someones birthday as the 4di.pdf
You know that most people use someones birthday as the 4di.pdf
 
You have come onto the unit after report You are required t.pdf
You have come onto the unit after report You are required t.pdfYou have come onto the unit after report You are required t.pdf
You have come onto the unit after report You are required t.pdf
 
you have a portfolio consisting solely of Stock A and Stock .pdf
you have a portfolio consisting solely of Stock A and Stock .pdfyou have a portfolio consisting solely of Stock A and Stock .pdf
you have a portfolio consisting solely of Stock A and Stock .pdf
 
You are designing an application that allows users to input .pdf
You are designing an application that allows users to input .pdfYou are designing an application that allows users to input .pdf
You are designing an application that allows users to input .pdf
 
You are required to present a research report in which you h.pdf
You are required to present a research report in which you h.pdfYou are required to present a research report in which you h.pdf
You are required to present a research report in which you h.pdf
 
You are at a professional association reception and you are.pdf
You are at a professional association reception and you are.pdfYou are at a professional association reception and you are.pdf
You are at a professional association reception and you are.pdf
 
You are a senior manager in an industry of your choosing Se.pdf
You are a senior manager in an industry of your choosing Se.pdfYou are a senior manager in an industry of your choosing Se.pdf
You are a senior manager in an industry of your choosing Se.pdf
 
yi bir etki lm stratejisi SElerin alar etrafndaki potan.pdf
yi bir etki lm stratejisi SElerin alar etrafndaki potan.pdfyi bir etki lm stratejisi SElerin alar etrafndaki potan.pdf
yi bir etki lm stratejisi SElerin alar etrafndaki potan.pdf
 
write the precis of the following passage and give suitable .pdf
write the precis of the following passage and give suitable .pdfwrite the precis of the following passage and give suitable .pdf
write the precis of the following passage and give suitable .pdf
 
Yeni bir elektronik para tr olan Bitcoini bir deiim arac .pdf
Yeni bir elektronik para tr olan Bitcoini bir deiim arac .pdfYeni bir elektronik para tr olan Bitcoini bir deiim arac .pdf
Yeni bir elektronik para tr olan Bitcoini bir deiim arac .pdf
 
You are a financial planner with a specialty in risk managem.pdf
You are a financial planner with a specialty in risk managem.pdfYou are a financial planner with a specialty in risk managem.pdf
You are a financial planner with a specialty in risk managem.pdf
 
write the code for Part 1 ContextFree Grammars Create con.pdf
write the code for Part 1  ContextFree Grammars Create con.pdfwrite the code for Part 1  ContextFree Grammars Create con.pdf
write the code for Part 1 ContextFree Grammars Create con.pdf
 
Xin 037 ile stel olarak dalm bir rasgele deiken oldu.pdf
Xin    037 ile stel olarak dalm bir rasgele deiken oldu.pdfXin    037 ile stel olarak dalm bir rasgele deiken oldu.pdf
Xin 037 ile stel olarak dalm bir rasgele deiken oldu.pdf
 
Write a parallel program using MPI and not OpeMP to accomp.pdf
Write a parallel program using MPI and not OpeMP to accomp.pdfWrite a parallel program using MPI and not OpeMP to accomp.pdf
Write a parallel program using MPI and not OpeMP to accomp.pdf
 
Write an MPI program to accomplish the following for a numbe.pdf
Write an MPI program to accomplish the following for a numbe.pdfWrite an MPI program to accomplish the following for a numbe.pdf
Write an MPI program to accomplish the following for a numbe.pdf
 
write a precis of the following passage and give a suitable .pdf
write a precis of the following passage and give a suitable .pdfwrite a precis of the following passage and give a suitable .pdf
write a precis of the following passage and give a suitable .pdf
 
x Banquet Ballyhoo at the Brunswick The annual members me.pdf
x Banquet Ballyhoo at the Brunswick   The annual members me.pdfx Banquet Ballyhoo at the Brunswick   The annual members me.pdf
x Banquet Ballyhoo at the Brunswick The annual members me.pdf
 

Recently uploaded

Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
AG2 Design
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
SriSurya50
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
scholarhattraining
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 

Recently uploaded (20)

Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 

Write functions to calculate the Nth Fibonacci number in ja.pdf

  • 1. Write functions to calculate the N-th Fibonacci number in java Use iterative method Use recursive method c) Run program (a) for =10000,100000; program (b) for n=1000,10000 d) Compare the actual running times.