SlideShare a Scribd company logo
When I input the number 3, my output is "Ready! 0 Go!".... what gives?
import java.util.Scanner;
public class ForLoops {
public static void main (String [] args) {
int numVal;
int i;
Scanner input = new Scanner(System.in);
numVal = input.nextInt();
System.out.println("Ready!");
for (i = numVal; i >= 1; i--); {
System.out.println(i);
}
System.out.println("Go!");
}
}

More Related Content

More from atexgarments

What would happen to the composition of the interstitial fluid if astr.pdf
What would happen to the composition of the interstitial fluid if astr.pdfWhat would happen to the composition of the interstitial fluid if astr.pdf
What would happen to the composition of the interstitial fluid if astr.pdf
atexgarments
 
What would happen if NAD+ was not generated for the citric acid cycle-.pdf
What would happen if NAD+ was not generated for the citric acid cycle-.pdfWhat would happen if NAD+ was not generated for the citric acid cycle-.pdf
What would happen if NAD+ was not generated for the citric acid cycle-.pdf
atexgarments
 
When constructing a pro forma Balance Sheet- is-are considered as Curr (1).pdf
When constructing a pro forma Balance Sheet- is-are considered as Curr (1).pdfWhen constructing a pro forma Balance Sheet- is-are considered as Curr (1).pdf
When constructing a pro forma Balance Sheet- is-are considered as Curr (1).pdf
atexgarments
 
What type of programming error is an attacker likely to attempt to exp.pdf
What type of programming error is an attacker likely to attempt to exp.pdfWhat type of programming error is an attacker likely to attempt to exp.pdf
What type of programming error is an attacker likely to attempt to exp.pdf
atexgarments
 
what was henry wirtz executed for- what was henry wirtz executed for-.pdf
what was henry wirtz executed for- what was henry wirtz executed for-.pdfwhat was henry wirtz executed for- what was henry wirtz executed for-.pdf
what was henry wirtz executed for- what was henry wirtz executed for-.pdf
atexgarments
 
What's wrong with my code- I am coding a battleship game that uses a d (1).pdf
What's wrong with my code- I am coding a battleship game that uses a d (1).pdfWhat's wrong with my code- I am coding a battleship game that uses a d (1).pdf
What's wrong with my code- I am coding a battleship game that uses a d (1).pdf
atexgarments
 
what would be the standard deciation of Bank B- Ba Bi Cick the ioon to.pdf
what would be the standard deciation of Bank B- Ba Bi Cick the ioon to.pdfwhat would be the standard deciation of Bank B- Ba Bi Cick the ioon to.pdf
what would be the standard deciation of Bank B- Ba Bi Cick the ioon to.pdf
atexgarments
 
When cells release signal molecules (ligands) to send a message- and t (1).pdf
When cells release signal molecules (ligands) to send a message- and t (1).pdfWhen cells release signal molecules (ligands) to send a message- and t (1).pdf
When cells release signal molecules (ligands) to send a message- and t (1).pdf
atexgarments
 
What type of volcano is shown in the ahoto- Glick to view laresimase d.pdf
What type of volcano is shown in the ahoto- Glick to view laresimase d.pdfWhat type of volcano is shown in the ahoto- Glick to view laresimase d.pdf
What type of volcano is shown in the ahoto- Glick to view laresimase d.pdf
atexgarments
 
When award without discussions is not stated in the solicitation and t.pdf
When award without discussions is not stated in the solicitation and t.pdfWhen award without discussions is not stated in the solicitation and t.pdf
When award without discussions is not stated in the solicitation and t.pdf
atexgarments
 
Which Munsell color notation has the lowest chroma- 10YR 1-2 5YR 6-7 2.pdf
Which Munsell color notation has the lowest chroma- 10YR 1-2 5YR 6-7 2.pdfWhich Munsell color notation has the lowest chroma- 10YR 1-2 5YR 6-7 2.pdf
Which Munsell color notation has the lowest chroma- 10YR 1-2 5YR 6-7 2.pdf
atexgarments
 
What type of value is being created by JD-com's digital and online ini.pdf
What type of value is being created by JD-com's digital and online ini.pdfWhat type of value is being created by JD-com's digital and online ini.pdf
What type of value is being created by JD-com's digital and online ini.pdf
atexgarments
 
What-where is the world's fastest computer- What do they use this co.pdf
What-where is the world's fastest computer-   What do they use this co.pdfWhat-where is the world's fastest computer-   What do they use this co.pdf
What-where is the world's fastest computer- What do they use this co.pdf
atexgarments
 
When are we likely to see private solutions to the problem of external.pdf
When are we likely to see private solutions to the problem of external.pdfWhen are we likely to see private solutions to the problem of external.pdf
When are we likely to see private solutions to the problem of external.pdf
atexgarments
 
What ways are CO2 carried in the blood-.pdf
What ways are CO2 carried in the blood-.pdfWhat ways are CO2 carried in the blood-.pdf
What ways are CO2 carried in the blood-.pdf
atexgarments
 
When ATP is hydrolyzed- the energy released is used for which of the f.pdf
When ATP is hydrolyzed- the energy released is used for which of the f.pdfWhen ATP is hydrolyzed- the energy released is used for which of the f.pdf
When ATP is hydrolyzed- the energy released is used for which of the f.pdf
atexgarments
 
What would be the output of the following ArrayList - Integer - list -.pdf
What would be the output of the following ArrayList - Integer - list -.pdfWhat would be the output of the following ArrayList - Integer - list -.pdf
What would be the output of the following ArrayList - Integer - list -.pdf
atexgarments
 
Which of the following are true about ribosomes - translation in BOTH (1).pdf
Which of the following are true about ribosomes - translation in BOTH (1).pdfWhich of the following are true about ribosomes - translation in BOTH (1).pdf
Which of the following are true about ribosomes - translation in BOTH (1).pdf
atexgarments
 
What two structures of the inner ear are responsible for the sense of.pdf
What two structures of the inner ear are responsible for the sense of.pdfWhat two structures of the inner ear are responsible for the sense of.pdf
What two structures of the inner ear are responsible for the sense of.pdf
atexgarments
 
Which of the following are reasons that the ocean is a difficult place (1).pdf
Which of the following are reasons that the ocean is a difficult place (1).pdfWhich of the following are reasons that the ocean is a difficult place (1).pdf
Which of the following are reasons that the ocean is a difficult place (1).pdf
atexgarments
 

More from atexgarments (20)

What would happen to the composition of the interstitial fluid if astr.pdf
What would happen to the composition of the interstitial fluid if astr.pdfWhat would happen to the composition of the interstitial fluid if astr.pdf
What would happen to the composition of the interstitial fluid if astr.pdf
 
What would happen if NAD+ was not generated for the citric acid cycle-.pdf
What would happen if NAD+ was not generated for the citric acid cycle-.pdfWhat would happen if NAD+ was not generated for the citric acid cycle-.pdf
What would happen if NAD+ was not generated for the citric acid cycle-.pdf
 
When constructing a pro forma Balance Sheet- is-are considered as Curr (1).pdf
When constructing a pro forma Balance Sheet- is-are considered as Curr (1).pdfWhen constructing a pro forma Balance Sheet- is-are considered as Curr (1).pdf
When constructing a pro forma Balance Sheet- is-are considered as Curr (1).pdf
 
What type of programming error is an attacker likely to attempt to exp.pdf
What type of programming error is an attacker likely to attempt to exp.pdfWhat type of programming error is an attacker likely to attempt to exp.pdf
What type of programming error is an attacker likely to attempt to exp.pdf
 
what was henry wirtz executed for- what was henry wirtz executed for-.pdf
what was henry wirtz executed for- what was henry wirtz executed for-.pdfwhat was henry wirtz executed for- what was henry wirtz executed for-.pdf
what was henry wirtz executed for- what was henry wirtz executed for-.pdf
 
What's wrong with my code- I am coding a battleship game that uses a d (1).pdf
What's wrong with my code- I am coding a battleship game that uses a d (1).pdfWhat's wrong with my code- I am coding a battleship game that uses a d (1).pdf
What's wrong with my code- I am coding a battleship game that uses a d (1).pdf
 
what would be the standard deciation of Bank B- Ba Bi Cick the ioon to.pdf
what would be the standard deciation of Bank B- Ba Bi Cick the ioon to.pdfwhat would be the standard deciation of Bank B- Ba Bi Cick the ioon to.pdf
what would be the standard deciation of Bank B- Ba Bi Cick the ioon to.pdf
 
When cells release signal molecules (ligands) to send a message- and t (1).pdf
When cells release signal molecules (ligands) to send a message- and t (1).pdfWhen cells release signal molecules (ligands) to send a message- and t (1).pdf
When cells release signal molecules (ligands) to send a message- and t (1).pdf
 
What type of volcano is shown in the ahoto- Glick to view laresimase d.pdf
What type of volcano is shown in the ahoto- Glick to view laresimase d.pdfWhat type of volcano is shown in the ahoto- Glick to view laresimase d.pdf
What type of volcano is shown in the ahoto- Glick to view laresimase d.pdf
 
When award without discussions is not stated in the solicitation and t.pdf
When award without discussions is not stated in the solicitation and t.pdfWhen award without discussions is not stated in the solicitation and t.pdf
When award without discussions is not stated in the solicitation and t.pdf
 
Which Munsell color notation has the lowest chroma- 10YR 1-2 5YR 6-7 2.pdf
Which Munsell color notation has the lowest chroma- 10YR 1-2 5YR 6-7 2.pdfWhich Munsell color notation has the lowest chroma- 10YR 1-2 5YR 6-7 2.pdf
Which Munsell color notation has the lowest chroma- 10YR 1-2 5YR 6-7 2.pdf
 
What type of value is being created by JD-com's digital and online ini.pdf
What type of value is being created by JD-com's digital and online ini.pdfWhat type of value is being created by JD-com's digital and online ini.pdf
What type of value is being created by JD-com's digital and online ini.pdf
 
What-where is the world's fastest computer- What do they use this co.pdf
What-where is the world's fastest computer-   What do they use this co.pdfWhat-where is the world's fastest computer-   What do they use this co.pdf
What-where is the world's fastest computer- What do they use this co.pdf
 
When are we likely to see private solutions to the problem of external.pdf
When are we likely to see private solutions to the problem of external.pdfWhen are we likely to see private solutions to the problem of external.pdf
When are we likely to see private solutions to the problem of external.pdf
 
What ways are CO2 carried in the blood-.pdf
What ways are CO2 carried in the blood-.pdfWhat ways are CO2 carried in the blood-.pdf
What ways are CO2 carried in the blood-.pdf
 
When ATP is hydrolyzed- the energy released is used for which of the f.pdf
When ATP is hydrolyzed- the energy released is used for which of the f.pdfWhen ATP is hydrolyzed- the energy released is used for which of the f.pdf
When ATP is hydrolyzed- the energy released is used for which of the f.pdf
 
What would be the output of the following ArrayList - Integer - list -.pdf
What would be the output of the following ArrayList - Integer - list -.pdfWhat would be the output of the following ArrayList - Integer - list -.pdf
What would be the output of the following ArrayList - Integer - list -.pdf
 
Which of the following are true about ribosomes - translation in BOTH (1).pdf
Which of the following are true about ribosomes - translation in BOTH (1).pdfWhich of the following are true about ribosomes - translation in BOTH (1).pdf
Which of the following are true about ribosomes - translation in BOTH (1).pdf
 
What two structures of the inner ear are responsible for the sense of.pdf
What two structures of the inner ear are responsible for the sense of.pdfWhat two structures of the inner ear are responsible for the sense of.pdf
What two structures of the inner ear are responsible for the sense of.pdf
 
Which of the following are reasons that the ocean is a difficult place (1).pdf
Which of the following are reasons that the ocean is a difficult place (1).pdfWhich of the following are reasons that the ocean is a difficult place (1).pdf
Which of the following are reasons that the ocean is a difficult place (1).pdf
 

Recently uploaded

Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Kalna College
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
Kalna College
 
How to Setup Default Value for a Field in Odoo 17
How to Setup Default Value for a Field in Odoo 17How to Setup Default Value for a Field in Odoo 17
How to Setup Default Value for a Field in Odoo 17
Celine George
 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Celine George
 
Ch-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdfCh-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdf
lakshayrojroj
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapitolTechU
 
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
andagarcia212
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
Kalna College
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science
Kalna College
 
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGHKHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
shreyassri1208
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
 

Recently uploaded (20)

Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
 
How to Setup Default Value for a Field in Odoo 17
How to Setup Default Value for a Field in Odoo 17How to Setup Default Value for a Field in Odoo 17
How to Setup Default Value for a Field in Odoo 17
 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
 
Ch-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdfCh-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdf
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
 
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science
 
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGHKHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
KHUSWANT SINGH.pptx ALL YOU NEED TO KNOW ABOUT KHUSHWANT SINGH
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
 

When I input the number 3- my output is -Ready! 0 Go!----- what gives-.pdf

  • 1. When I input the number 3, my output is "Ready! 0 Go!".... what gives? import java.util.Scanner; public class ForLoops { public static void main (String [] args) { int numVal; int i; Scanner input = new Scanner(System.in); numVal = input.nextInt(); System.out.println("Ready!"); for (i = numVal; i >= 1; i--); { System.out.println(i); } System.out.println("Go!"); } }