SlideShare a Scribd company logo
1 of 1
Download to read offline
What is the output, if n is 3?
for (int i = 1; i <= n; ++i) {
int factorial = 1;
factorial = factorial * i;
system.out.print(factorial + " ");
}
1 1 1
1 2 3
1 2 6
Error: Cannot use the loop variable i inside the
for loop

More Related Content

More from adityaemporiyam

What is the output on console public static void mainString.pdf
What is the output on console public static void mainString.pdfWhat is the output on console public static void mainString.pdf
What is the output on console public static void mainString.pdfadityaemporiyam
 
What is the problem with Bluetooth and IEEE 80211b WLANs us.pdf
What is the problem with Bluetooth and IEEE 80211b WLANs us.pdfWhat is the problem with Bluetooth and IEEE 80211b WLANs us.pdf
What is the problem with Bluetooth and IEEE 80211b WLANs us.pdfadityaemporiyam
 
What is the most accurate discription of the best winwin .pdf
What is the most accurate discription of the best winwin .pdfWhat is the most accurate discription of the best winwin .pdf
What is the most accurate discription of the best winwin .pdfadityaemporiyam
 
What is the function of the parental DNA in replication Wha.pdf
What is the function of the parental DNA in replication Wha.pdfWhat is the function of the parental DNA in replication Wha.pdf
What is the function of the parental DNA in replication Wha.pdfadityaemporiyam
 
What is the genotype of the first female in the second row .pdf
What is the genotype of the first female in the second row .pdfWhat is the genotype of the first female in the second row .pdf
What is the genotype of the first female in the second row .pdfadityaemporiyam
 
What is the primary composition of the Jovian planets Hydro.pdf
What is the primary composition of the Jovian planets Hydro.pdfWhat is the primary composition of the Jovian planets Hydro.pdf
What is the primary composition of the Jovian planets Hydro.pdfadityaemporiyam
 
What is the major physical symptom associated with Klinefelt.pdf
What is the major physical symptom associated with Klinefelt.pdfWhat is the major physical symptom associated with Klinefelt.pdf
What is the major physical symptom associated with Klinefelt.pdfadityaemporiyam
 
What is the Geologic Time Period Age of the formation expo.pdf
What is the Geologic Time Period Age of the formation expo.pdfWhat is the Geologic Time Period Age of the formation expo.pdf
What is the Geologic Time Period Age of the formation expo.pdfadityaemporiyam
 
What is the pvalue if in a twotail hypothesis test ZSTAT.pdf
What is the pvalue if in a twotail hypothesis test ZSTAT.pdfWhat is the pvalue if in a twotail hypothesis test ZSTAT.pdf
What is the pvalue if in a twotail hypothesis test ZSTAT.pdfadityaemporiyam
 
What is the meaning of the term cost bias in Hussain and .pdf
What is the meaning of the term cost bias in Hussain and .pdfWhat is the meaning of the term cost bias in Hussain and .pdf
What is the meaning of the term cost bias in Hussain and .pdfadityaemporiyam
 
What is the first step in energy flow through an ecosystem .pdf
What is the first step in energy flow through an ecosystem .pdfWhat is the first step in energy flow through an ecosystem .pdf
What is the first step in energy flow through an ecosystem .pdfadityaemporiyam
 
What is the first step in identifying cash flows from operat.pdf
What is the first step in identifying cash flows from operat.pdfWhat is the first step in identifying cash flows from operat.pdf
What is the first step in identifying cash flows from operat.pdfadityaemporiyam
 
What is the EKC hypothesis What are its implications Wha.pdf
What is the EKC hypothesis  What are its implications  Wha.pdfWhat is the EKC hypothesis  What are its implications  Wha.pdf
What is the EKC hypothesis What are its implications Wha.pdfadityaemporiyam
 
What is the first step in developing a project schedule 1 .pdf
What is the first step in developing a project schedule 1 .pdfWhat is the first step in developing a project schedule 1 .pdf
What is the first step in developing a project schedule 1 .pdfadityaemporiyam
 
When sampling from a population the sample mean will A a.pdf
When sampling from a population the sample mean will  A a.pdfWhen sampling from a population the sample mean will  A a.pdf
When sampling from a population the sample mean will A a.pdfadityaemporiyam
 
When Marilyn Monroe died exhusband Joe DiMaggio vowed to p.pdf
When Marilyn Monroe died exhusband Joe DiMaggio vowed to p.pdfWhen Marilyn Monroe died exhusband Joe DiMaggio vowed to p.pdf
When Marilyn Monroe died exhusband Joe DiMaggio vowed to p.pdfadityaemporiyam
 
What is the impact of employment at will on employees Emplo.pdf
What is the impact of employment at will on employees Emplo.pdfWhat is the impact of employment at will on employees Emplo.pdf
What is the impact of employment at will on employees Emplo.pdfadityaemporiyam
 
When NADH or NADPH transfers electrons to a recipient molecu.pdf
When NADH or NADPH transfers electrons to a recipient molecu.pdfWhen NADH or NADPH transfers electrons to a recipient molecu.pdf
When NADH or NADPH transfers electrons to a recipient molecu.pdfadityaemporiyam
 
When describing a queuing system if we were to say that .pdf
When describing a queuing system if we were to say that .pdfWhen describing a queuing system if we were to say that .pdf
When describing a queuing system if we were to say that .pdfadityaemporiyam
 
When company directors and major owners of stock disclose th.pdf
When company directors and major owners of stock disclose th.pdfWhen company directors and major owners of stock disclose th.pdf
When company directors and major owners of stock disclose th.pdfadityaemporiyam
 

More from adityaemporiyam (20)

What is the output on console public static void mainString.pdf
What is the output on console public static void mainString.pdfWhat is the output on console public static void mainString.pdf
What is the output on console public static void mainString.pdf
 
What is the problem with Bluetooth and IEEE 80211b WLANs us.pdf
What is the problem with Bluetooth and IEEE 80211b WLANs us.pdfWhat is the problem with Bluetooth and IEEE 80211b WLANs us.pdf
What is the problem with Bluetooth and IEEE 80211b WLANs us.pdf
 
What is the most accurate discription of the best winwin .pdf
What is the most accurate discription of the best winwin .pdfWhat is the most accurate discription of the best winwin .pdf
What is the most accurate discription of the best winwin .pdf
 
What is the function of the parental DNA in replication Wha.pdf
What is the function of the parental DNA in replication Wha.pdfWhat is the function of the parental DNA in replication Wha.pdf
What is the function of the parental DNA in replication Wha.pdf
 
What is the genotype of the first female in the second row .pdf
What is the genotype of the first female in the second row .pdfWhat is the genotype of the first female in the second row .pdf
What is the genotype of the first female in the second row .pdf
 
What is the primary composition of the Jovian planets Hydro.pdf
What is the primary composition of the Jovian planets Hydro.pdfWhat is the primary composition of the Jovian planets Hydro.pdf
What is the primary composition of the Jovian planets Hydro.pdf
 
What is the major physical symptom associated with Klinefelt.pdf
What is the major physical symptom associated with Klinefelt.pdfWhat is the major physical symptom associated with Klinefelt.pdf
What is the major physical symptom associated with Klinefelt.pdf
 
What is the Geologic Time Period Age of the formation expo.pdf
What is the Geologic Time Period Age of the formation expo.pdfWhat is the Geologic Time Period Age of the formation expo.pdf
What is the Geologic Time Period Age of the formation expo.pdf
 
What is the pvalue if in a twotail hypothesis test ZSTAT.pdf
What is the pvalue if in a twotail hypothesis test ZSTAT.pdfWhat is the pvalue if in a twotail hypothesis test ZSTAT.pdf
What is the pvalue if in a twotail hypothesis test ZSTAT.pdf
 
What is the meaning of the term cost bias in Hussain and .pdf
What is the meaning of the term cost bias in Hussain and .pdfWhat is the meaning of the term cost bias in Hussain and .pdf
What is the meaning of the term cost bias in Hussain and .pdf
 
What is the first step in energy flow through an ecosystem .pdf
What is the first step in energy flow through an ecosystem .pdfWhat is the first step in energy flow through an ecosystem .pdf
What is the first step in energy flow through an ecosystem .pdf
 
What is the first step in identifying cash flows from operat.pdf
What is the first step in identifying cash flows from operat.pdfWhat is the first step in identifying cash flows from operat.pdf
What is the first step in identifying cash flows from operat.pdf
 
What is the EKC hypothesis What are its implications Wha.pdf
What is the EKC hypothesis  What are its implications  Wha.pdfWhat is the EKC hypothesis  What are its implications  Wha.pdf
What is the EKC hypothesis What are its implications Wha.pdf
 
What is the first step in developing a project schedule 1 .pdf
What is the first step in developing a project schedule 1 .pdfWhat is the first step in developing a project schedule 1 .pdf
What is the first step in developing a project schedule 1 .pdf
 
When sampling from a population the sample mean will A a.pdf
When sampling from a population the sample mean will  A a.pdfWhen sampling from a population the sample mean will  A a.pdf
When sampling from a population the sample mean will A a.pdf
 
When Marilyn Monroe died exhusband Joe DiMaggio vowed to p.pdf
When Marilyn Monroe died exhusband Joe DiMaggio vowed to p.pdfWhen Marilyn Monroe died exhusband Joe DiMaggio vowed to p.pdf
When Marilyn Monroe died exhusband Joe DiMaggio vowed to p.pdf
 
What is the impact of employment at will on employees Emplo.pdf
What is the impact of employment at will on employees Emplo.pdfWhat is the impact of employment at will on employees Emplo.pdf
What is the impact of employment at will on employees Emplo.pdf
 
When NADH or NADPH transfers electrons to a recipient molecu.pdf
When NADH or NADPH transfers electrons to a recipient molecu.pdfWhen NADH or NADPH transfers electrons to a recipient molecu.pdf
When NADH or NADPH transfers electrons to a recipient molecu.pdf
 
When describing a queuing system if we were to say that .pdf
When describing a queuing system if we were to say that .pdfWhen describing a queuing system if we were to say that .pdf
When describing a queuing system if we were to say that .pdf
 
When company directors and major owners of stock disclose th.pdf
When company directors and major owners of stock disclose th.pdfWhen company directors and major owners of stock disclose th.pdf
When company directors and major owners of stock disclose th.pdf
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 

Recently uploaded (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 

What is the output if n is 3 for int i 1 i lt n ++.pdf

  • 1. What is the output, if n is 3? for (int i = 1; i <= n; ++i) { int factorial = 1; factorial = factorial * i; system.out.print(factorial + " "); } 1 1 1 1 2 3 1 2 6 Error: Cannot use the loop variable i inside the for loop