SlideShare a Scribd company logo
1 of 2
Download to read offline
Hello. This program has to be done in Eclipse(Program used to write java code)
Write a program that prints the first 30 numbers in the Fibonacci sequence while omitting the
third number(it is replaced with an X)
Ex: 0,1,X,2,3,X,18.....
I have most of the code but, cannot figure out the part on how to delete every third number in the
sequence 1 import java.util.*; 2 public class Fibonaccii 3e 4 5 6 7 public static void main
(String[] args) i Scanner s= new Scanner (System.in); System. out.println ("Enter you desired
value of n: ") int n = s.nextInt(); for (int i = 0; |
Solution
import java.util.*;
public class Fibonacci{
public static int fibonacci(int n){
if (n==0){
return 0;
}
else if(n==1){
return 1;
}
else{
return fibonacci(n-1)+fibonacci(n-2);
}
}
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
for (int i=1; i<=n; i++){
if(i%3!=0){
System.out.print(fibonacci(i-1)+" ");
}
else{
System.out.print("X ");
}
}
}
}

More Related Content

Similar to Hello. This program has to be done in Eclipse(Program used to write .pdf

Computer java programs
Computer java programsComputer java programs
Computer java programsADITYA BHARTI
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2Ankit Gupta
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressionsLogan Chien
 
Lab101.pptx
Lab101.pptxLab101.pptx
Lab101.pptxKimVeeL
 
Modify before asshignment so that we can check input errors, etc.. P.pdf
Modify before asshignment so that we can check input errors, etc.. P.pdfModify before asshignment so that we can check input errors, etc.. P.pdf
Modify before asshignment so that we can check input errors, etc.. P.pdfarihantplastictanksh
 
import java.util.; public class DecimalToBinary { public stat.pdf
import java.util.; public class DecimalToBinary { public stat.pdfimport java.util.; public class DecimalToBinary { public stat.pdf
import java.util.; public class DecimalToBinary { public stat.pdfanithareadymade
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...MaruMengesha
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple ProgramsUpender Upr
 
Codeimport java.util.Random; import java.util.Scanner;public .pdf
Codeimport java.util.Random; import java.util.Scanner;public .pdfCodeimport java.util.Random; import java.util.Scanner;public .pdf
Codeimport java.util.Random; import java.util.Scanner;public .pdfanupamfootwear
 
C# 6Write a program that creates a Calculation ClassUse the foll.pdf
C# 6Write a program that creates a Calculation ClassUse the foll.pdfC# 6Write a program that creates a Calculation ClassUse the foll.pdf
C# 6Write a program that creates a Calculation ClassUse the foll.pdfssuserc77a341
 

Similar to Hello. This program has to be done in Eclipse(Program used to write .pdf (13)

3.Lesson Plan - Input.pdf.pdf
3.Lesson Plan - Input.pdf.pdf3.Lesson Plan - Input.pdf.pdf
3.Lesson Plan - Input.pdf.pdf
 
Computer java programs
Computer java programsComputer java programs
Computer java programs
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressions
 
Lab101.pptx
Lab101.pptxLab101.pptx
Lab101.pptx
 
Modify before asshignment so that we can check input errors, etc.. P.pdf
Modify before asshignment so that we can check input errors, etc.. P.pdfModify before asshignment so that we can check input errors, etc.. P.pdf
Modify before asshignment so that we can check input errors, etc.. P.pdf
 
import java.util.; public class DecimalToBinary { public stat.pdf
import java.util.; public class DecimalToBinary { public stat.pdfimport java.util.; public class DecimalToBinary { public stat.pdf
import java.util.; public class DecimalToBinary { public stat.pdf
 
C#.net
C#.netC#.net
C#.net
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_17-Feb-2021_L8-...
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple Programs
 
Codeimport java.util.Random; import java.util.Scanner;public .pdf
Codeimport java.util.Random; import java.util.Scanner;public .pdfCodeimport java.util.Random; import java.util.Scanner;public .pdf
Codeimport java.util.Random; import java.util.Scanner;public .pdf
 
LAB1.docx
LAB1.docxLAB1.docx
LAB1.docx
 
C# 6Write a program that creates a Calculation ClassUse the foll.pdf
C# 6Write a program that creates a Calculation ClassUse the foll.pdfC# 6Write a program that creates a Calculation ClassUse the foll.pdf
C# 6Write a program that creates a Calculation ClassUse the foll.pdf
 

More from archiesgallery

Is it possible to provide health care without rationing In 1948 eve.pdf
Is it possible to provide health care without rationing In 1948 eve.pdfIs it possible to provide health care without rationing In 1948 eve.pdf
Is it possible to provide health care without rationing In 1948 eve.pdfarchiesgallery
 
In what structure does meiosis occur in the bryophytesSolution.pdf
In what structure does meiosis occur in the bryophytesSolution.pdfIn what structure does meiosis occur in the bryophytesSolution.pdf
In what structure does meiosis occur in the bryophytesSolution.pdfarchiesgallery
 
How was it established that particular phenotypes are inherited as a.pdf
How was it established that particular phenotypes are inherited as a.pdfHow was it established that particular phenotypes are inherited as a.pdf
How was it established that particular phenotypes are inherited as a.pdfarchiesgallery
 
Given the following homogeneous ODE 2y + 12y + 68y = 0 with initial .pdf
Given the following homogeneous ODE  2y + 12y + 68y = 0 with initial .pdfGiven the following homogeneous ODE  2y + 12y + 68y = 0 with initial .pdf
Given the following homogeneous ODE 2y + 12y + 68y = 0 with initial .pdfarchiesgallery
 
For an artist to be considered an outsider, he or she must first be.pdf
For an artist to be considered an outsider, he or she must first be.pdfFor an artist to be considered an outsider, he or she must first be.pdf
For an artist to be considered an outsider, he or she must first be.pdfarchiesgallery
 
Find a article or news about Biological ScienceIdentify source (in.pdf
Find a article or news about Biological ScienceIdentify source (in.pdfFind a article or news about Biological ScienceIdentify source (in.pdf
Find a article or news about Biological ScienceIdentify source (in.pdfarchiesgallery
 
Discuss in detail the importance of either ageneral standardstan.pdf
Discuss in detail the importance of either ageneral standardstan.pdfDiscuss in detail the importance of either ageneral standardstan.pdf
Discuss in detail the importance of either ageneral standardstan.pdfarchiesgallery
 
Distinguish between a blastula, a blastomere, a blastopore, and a bla.pdf
Distinguish between a blastula, a blastomere, a blastopore, and a bla.pdfDistinguish between a blastula, a blastomere, a blastopore, and a bla.pdf
Distinguish between a blastula, a blastomere, a blastopore, and a bla.pdfarchiesgallery
 
Compare and contrast an information systems development project in a.pdf
Compare and contrast an information systems development project in a.pdfCompare and contrast an information systems development project in a.pdf
Compare and contrast an information systems development project in a.pdfarchiesgallery
 
can high level language can use an assembler.SolutionHigh-l.pdf
can high level language can use an assembler.SolutionHigh-l.pdfcan high level language can use an assembler.SolutionHigh-l.pdf
can high level language can use an assembler.SolutionHigh-l.pdfarchiesgallery
 
Briefly describe a mechanim of virus entry into the cells and give o.pdf
Briefly describe a mechanim of virus entry into the cells and give o.pdfBriefly describe a mechanim of virus entry into the cells and give o.pdf
Briefly describe a mechanim of virus entry into the cells and give o.pdfarchiesgallery
 
Why are traditional definitions of “interception” problematic when a.pdf
Why are traditional definitions of “interception” problematic when a.pdfWhy are traditional definitions of “interception” problematic when a.pdf
Why are traditional definitions of “interception” problematic when a.pdfarchiesgallery
 
why is it important for macromolecular cellular structures to be fle.pdf
why is it important for macromolecular cellular structures to be fle.pdfwhy is it important for macromolecular cellular structures to be fle.pdf
why is it important for macromolecular cellular structures to be fle.pdfarchiesgallery
 
Widgets ’R Us (WRU) is a medium-sized firm specializing in the desig.pdf
Widgets ’R Us (WRU) is a medium-sized firm specializing in the desig.pdfWidgets ’R Us (WRU) is a medium-sized firm specializing in the desig.pdf
Widgets ’R Us (WRU) is a medium-sized firm specializing in the desig.pdfarchiesgallery
 
Which of the following entities can be homozygous (there may be mor.pdf
Which of the following entities can be homozygous (there may be mor.pdfWhich of the following entities can be homozygous (there may be mor.pdf
Which of the following entities can be homozygous (there may be mor.pdfarchiesgallery
 
Where is the lysosomes locales in the cell Where is the lysosom.pdf
Where is the lysosomes locales in the cell Where is the lysosom.pdfWhere is the lysosomes locales in the cell Where is the lysosom.pdf
Where is the lysosomes locales in the cell Where is the lysosom.pdfarchiesgallery
 
Which of the following is the most specific of security documents.pdf
Which of the following is the most specific of security documents.pdfWhich of the following is the most specific of security documents.pdf
Which of the following is the most specific of security documents.pdfarchiesgallery
 
What is the consequence when a chromosome loses its telomeresSol.pdf
What is the consequence when a chromosome loses its telomeresSol.pdfWhat is the consequence when a chromosome loses its telomeresSol.pdf
What is the consequence when a chromosome loses its telomeresSol.pdfarchiesgallery
 
We usually use when having a conversation with others. left hemisph.pdf
We usually use  when having a conversation with others.  left hemisph.pdfWe usually use  when having a conversation with others.  left hemisph.pdf
We usually use when having a conversation with others. left hemisph.pdfarchiesgallery
 
The security kernel is found at what protection ring levelA. Ring.pdf
The security kernel is found at what protection ring levelA. Ring.pdfThe security kernel is found at what protection ring levelA. Ring.pdf
The security kernel is found at what protection ring levelA. Ring.pdfarchiesgallery
 

More from archiesgallery (20)

Is it possible to provide health care without rationing In 1948 eve.pdf
Is it possible to provide health care without rationing In 1948 eve.pdfIs it possible to provide health care without rationing In 1948 eve.pdf
Is it possible to provide health care without rationing In 1948 eve.pdf
 
In what structure does meiosis occur in the bryophytesSolution.pdf
In what structure does meiosis occur in the bryophytesSolution.pdfIn what structure does meiosis occur in the bryophytesSolution.pdf
In what structure does meiosis occur in the bryophytesSolution.pdf
 
How was it established that particular phenotypes are inherited as a.pdf
How was it established that particular phenotypes are inherited as a.pdfHow was it established that particular phenotypes are inherited as a.pdf
How was it established that particular phenotypes are inherited as a.pdf
 
Given the following homogeneous ODE 2y + 12y + 68y = 0 with initial .pdf
Given the following homogeneous ODE  2y + 12y + 68y = 0 with initial .pdfGiven the following homogeneous ODE  2y + 12y + 68y = 0 with initial .pdf
Given the following homogeneous ODE 2y + 12y + 68y = 0 with initial .pdf
 
For an artist to be considered an outsider, he or she must first be.pdf
For an artist to be considered an outsider, he or she must first be.pdfFor an artist to be considered an outsider, he or she must first be.pdf
For an artist to be considered an outsider, he or she must first be.pdf
 
Find a article or news about Biological ScienceIdentify source (in.pdf
Find a article or news about Biological ScienceIdentify source (in.pdfFind a article or news about Biological ScienceIdentify source (in.pdf
Find a article or news about Biological ScienceIdentify source (in.pdf
 
Discuss in detail the importance of either ageneral standardstan.pdf
Discuss in detail the importance of either ageneral standardstan.pdfDiscuss in detail the importance of either ageneral standardstan.pdf
Discuss in detail the importance of either ageneral standardstan.pdf
 
Distinguish between a blastula, a blastomere, a blastopore, and a bla.pdf
Distinguish between a blastula, a blastomere, a blastopore, and a bla.pdfDistinguish between a blastula, a blastomere, a blastopore, and a bla.pdf
Distinguish between a blastula, a blastomere, a blastopore, and a bla.pdf
 
Compare and contrast an information systems development project in a.pdf
Compare and contrast an information systems development project in a.pdfCompare and contrast an information systems development project in a.pdf
Compare and contrast an information systems development project in a.pdf
 
can high level language can use an assembler.SolutionHigh-l.pdf
can high level language can use an assembler.SolutionHigh-l.pdfcan high level language can use an assembler.SolutionHigh-l.pdf
can high level language can use an assembler.SolutionHigh-l.pdf
 
Briefly describe a mechanim of virus entry into the cells and give o.pdf
Briefly describe a mechanim of virus entry into the cells and give o.pdfBriefly describe a mechanim of virus entry into the cells and give o.pdf
Briefly describe a mechanim of virus entry into the cells and give o.pdf
 
Why are traditional definitions of “interception” problematic when a.pdf
Why are traditional definitions of “interception” problematic when a.pdfWhy are traditional definitions of “interception” problematic when a.pdf
Why are traditional definitions of “interception” problematic when a.pdf
 
why is it important for macromolecular cellular structures to be fle.pdf
why is it important for macromolecular cellular structures to be fle.pdfwhy is it important for macromolecular cellular structures to be fle.pdf
why is it important for macromolecular cellular structures to be fle.pdf
 
Widgets ’R Us (WRU) is a medium-sized firm specializing in the desig.pdf
Widgets ’R Us (WRU) is a medium-sized firm specializing in the desig.pdfWidgets ’R Us (WRU) is a medium-sized firm specializing in the desig.pdf
Widgets ’R Us (WRU) is a medium-sized firm specializing in the desig.pdf
 
Which of the following entities can be homozygous (there may be mor.pdf
Which of the following entities can be homozygous (there may be mor.pdfWhich of the following entities can be homozygous (there may be mor.pdf
Which of the following entities can be homozygous (there may be mor.pdf
 
Where is the lysosomes locales in the cell Where is the lysosom.pdf
Where is the lysosomes locales in the cell Where is the lysosom.pdfWhere is the lysosomes locales in the cell Where is the lysosom.pdf
Where is the lysosomes locales in the cell Where is the lysosom.pdf
 
Which of the following is the most specific of security documents.pdf
Which of the following is the most specific of security documents.pdfWhich of the following is the most specific of security documents.pdf
Which of the following is the most specific of security documents.pdf
 
What is the consequence when a chromosome loses its telomeresSol.pdf
What is the consequence when a chromosome loses its telomeresSol.pdfWhat is the consequence when a chromosome loses its telomeresSol.pdf
What is the consequence when a chromosome loses its telomeresSol.pdf
 
We usually use when having a conversation with others. left hemisph.pdf
We usually use  when having a conversation with others.  left hemisph.pdfWe usually use  when having a conversation with others.  left hemisph.pdf
We usually use when having a conversation with others. left hemisph.pdf
 
The security kernel is found at what protection ring levelA. Ring.pdf
The security kernel is found at what protection ring levelA. Ring.pdfThe security kernel is found at what protection ring levelA. Ring.pdf
The security kernel is found at what protection ring levelA. Ring.pdf
 

Recently uploaded

Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 

Recently uploaded (20)

Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 

Hello. This program has to be done in Eclipse(Program used to write .pdf

  • 1. Hello. This program has to be done in Eclipse(Program used to write java code) Write a program that prints the first 30 numbers in the Fibonacci sequence while omitting the third number(it is replaced with an X) Ex: 0,1,X,2,3,X,18..... I have most of the code but, cannot figure out the part on how to delete every third number in the sequence 1 import java.util.*; 2 public class Fibonaccii 3e 4 5 6 7 public static void main (String[] args) i Scanner s= new Scanner (System.in); System. out.println ("Enter you desired value of n: ") int n = s.nextInt(); for (int i = 0; | Solution import java.util.*; public class Fibonacci{ public static int fibonacci(int n){ if (n==0){ return 0; } else if(n==1){ return 1; } else{ return fibonacci(n-1)+fibonacci(n-2); } } public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); for (int i=1; i<=n; i++){ if(i%3!=0){ System.out.print(fibonacci(i-1)+" "); } else{ System.out.print("X "); } }
  • 2. } }