SlideShare a Scribd company logo
Code:
class Main {
public static void main(String[] args) {
double[] p = new double[12];
p[1] = 100;
int r = 5;
for(int i=2; i < 12; i++){
p[i] = p[i-1]*(1+(r/100.0));
}
System.out.println("Initial Population is : "+p[1]);
System.out.println("Hour --> Population");
for(int i=2; i < 12; i++){
System.out.println(i-1+" --> "+p[i]);
}
}
}
Output:
Solution
Code:
class Main {
public static void main(String[] args) {
double[] p = new double[12];
p[1] = 100;
int r = 5;
for(int i=2; i < 12; i++){
p[i] = p[i-1]*(1+(r/100.0));
}
System.out.println("Initial Population is : "+p[1]);
System.out.println("Hour --> Population");
for(int i=2; i < 12; i++){
System.out.println(i-1+" --> "+p[i]);
}
}
}
Output:

More Related Content

More from sanjeevtandonsre

Water qualities1. Physical qualitiesOdour and taste unobject.pdf
Water qualities1. Physical qualitiesOdour and taste  unobject.pdfWater qualities1. Physical qualitiesOdour and taste  unobject.pdf
Water qualities1. Physical qualitiesOdour and taste unobject.pdf
sanjeevtandonsre
 
Uses of HRIS SystemsThe principle motivation behind keeping up HR.pdf
Uses of HRIS SystemsThe principle motivation behind keeping up HR.pdfUses of HRIS SystemsThe principle motivation behind keeping up HR.pdf
Uses of HRIS SystemsThe principle motivation behind keeping up HR.pdf
sanjeevtandonsre
 
The moving force behind IT decisions are variable as to what context.pdf
The moving force behind IT decisions are variable as to what context.pdfThe moving force behind IT decisions are variable as to what context.pdf
The moving force behind IT decisions are variable as to what context.pdf
sanjeevtandonsre
 
The Canadian city with a pre- 1800 historic heart is QuebecSolut.pdf
The Canadian city with a pre- 1800 historic heart is QuebecSolut.pdfThe Canadian city with a pre- 1800 historic heart is QuebecSolut.pdf
The Canadian city with a pre- 1800 historic heart is QuebecSolut.pdf
sanjeevtandonsre
 
Solution Millennials referred to as narcissistic referred to as n.pdf
Solution Millennials referred to as narcissistic referred to as n.pdfSolution Millennials referred to as narcissistic referred to as n.pdf
Solution Millennials referred to as narcissistic referred to as n.pdf
sanjeevtandonsre
 
SolutionThe SELECT DISTINCT stamen will returns distinct values. .pdf
SolutionThe SELECT DISTINCT stamen will returns distinct values. .pdfSolutionThe SELECT DISTINCT stamen will returns distinct values. .pdf
SolutionThe SELECT DISTINCT stamen will returns distinct values. .pdf
sanjeevtandonsre
 
Starting from the topmost column,1. Cerebellum2. Spinocerebellar.pdf
Starting from the topmost column,1. Cerebellum2. Spinocerebellar.pdfStarting from the topmost column,1. Cerebellum2. Spinocerebellar.pdf
Starting from the topmost column,1. Cerebellum2. Spinocerebellar.pdf
sanjeevtandonsre
 
Rheumatic fever shows various symptoms and signs, out of which sore .pdf
Rheumatic fever shows various symptoms and signs, out of which sore .pdfRheumatic fever shows various symptoms and signs, out of which sore .pdf
Rheumatic fever shows various symptoms and signs, out of which sore .pdf
sanjeevtandonsre
 
Physiological responce are those in which the functions of the body .pdf
Physiological responce are those in which the functions of the body .pdfPhysiological responce are those in which the functions of the body .pdf
Physiological responce are those in which the functions of the body .pdf
sanjeevtandonsre
 
NaF is the only oneSolutionNaF is the only one.pdf
NaF is the only oneSolutionNaF is the only one.pdfNaF is the only oneSolutionNaF is the only one.pdf
NaF is the only oneSolutionNaF is the only one.pdf
sanjeevtandonsre
 
okkkSolutionokkk.pdf
okkkSolutionokkk.pdfokkkSolutionokkk.pdf
okkkSolutionokkk.pdf
sanjeevtandonsre
 
Minimum IQ is 131SolutionMinimum IQ is 131.pdf
Minimum IQ is 131SolutionMinimum IQ is 131.pdfMinimum IQ is 131SolutionMinimum IQ is 131.pdf
Minimum IQ is 131SolutionMinimum IQ is 131.pdf
sanjeevtandonsre
 
co2 because of the sqrt of their molar mases.. .pdf
                     co2 because of the sqrt of their molar mases..   .pdf                     co2 because of the sqrt of their molar mases..   .pdf
co2 because of the sqrt of their molar mases.. .pdf
sanjeevtandonsre
 
L{e^{-t}} = int _0 to infinty [e^{st}e^{-t} dt = int _0 to infinty .pdf
L{e^{-t}} = int _0 to infinty [e^{st}e^{-t} dt = int _0 to infinty .pdfL{e^{-t}} = int _0 to infinty [e^{st}e^{-t} dt = int _0 to infinty .pdf
L{e^{-t}} = int _0 to infinty [e^{st}e^{-t} dt = int _0 to infinty .pdf
sanjeevtandonsre
 
carbon forms 4 hydrogen forms 1 nitrogen forms 3 .pdf
                     carbon forms 4 hydrogen forms 1 nitrogen forms 3 .pdf                     carbon forms 4 hydrogen forms 1 nitrogen forms 3 .pdf
carbon forms 4 hydrogen forms 1 nitrogen forms 3 .pdf
sanjeevtandonsre
 
H = H(lattice) + H(first ionisation) +H(second ionization) +2H(elec.pdf
H = H(lattice) + H(first ionisation) +H(second ionization) +2H(elec.pdfH = H(lattice) + H(first ionisation) +H(second ionization) +2H(elec.pdf
H = H(lattice) + H(first ionisation) +H(second ionization) +2H(elec.pdf
sanjeevtandonsre
 
Heptatomic molecules contain 7 atomsNo. of H atoms = 2No. of S .pdf
Heptatomic molecules contain 7 atomsNo. of H atoms = 2No. of S .pdfHeptatomic molecules contain 7 atomsNo. of H atoms = 2No. of S .pdf
Heptatomic molecules contain 7 atomsNo. of H atoms = 2No. of S .pdf
sanjeevtandonsre
 
ExperimentRegionTissue expressedConclusion1ABCLIVER.pdf
ExperimentRegionTissue expressedConclusion1ABCLIVER.pdfExperimentRegionTissue expressedConclusion1ABCLIVER.pdf
ExperimentRegionTissue expressedConclusion1ABCLIVER.pdf
sanjeevtandonsre
 
D . All of the above could be reported within the fund financial sta.pdf
D . All of the above could be reported within the fund financial sta.pdfD . All of the above could be reported within the fund financial sta.pdf
D . All of the above could be reported within the fund financial sta.pdf
sanjeevtandonsre
 
CIRT is necesary because the problems may come unknowingly but it ha.pdf
CIRT is necesary because the problems may come unknowingly but it ha.pdfCIRT is necesary because the problems may come unknowingly but it ha.pdf
CIRT is necesary because the problems may come unknowingly but it ha.pdf
sanjeevtandonsre
 

More from sanjeevtandonsre (20)

Water qualities1. Physical qualitiesOdour and taste unobject.pdf
Water qualities1. Physical qualitiesOdour and taste  unobject.pdfWater qualities1. Physical qualitiesOdour and taste  unobject.pdf
Water qualities1. Physical qualitiesOdour and taste unobject.pdf
 
Uses of HRIS SystemsThe principle motivation behind keeping up HR.pdf
Uses of HRIS SystemsThe principle motivation behind keeping up HR.pdfUses of HRIS SystemsThe principle motivation behind keeping up HR.pdf
Uses of HRIS SystemsThe principle motivation behind keeping up HR.pdf
 
The moving force behind IT decisions are variable as to what context.pdf
The moving force behind IT decisions are variable as to what context.pdfThe moving force behind IT decisions are variable as to what context.pdf
The moving force behind IT decisions are variable as to what context.pdf
 
The Canadian city with a pre- 1800 historic heart is QuebecSolut.pdf
The Canadian city with a pre- 1800 historic heart is QuebecSolut.pdfThe Canadian city with a pre- 1800 historic heart is QuebecSolut.pdf
The Canadian city with a pre- 1800 historic heart is QuebecSolut.pdf
 
Solution Millennials referred to as narcissistic referred to as n.pdf
Solution Millennials referred to as narcissistic referred to as n.pdfSolution Millennials referred to as narcissistic referred to as n.pdf
Solution Millennials referred to as narcissistic referred to as n.pdf
 
SolutionThe SELECT DISTINCT stamen will returns distinct values. .pdf
SolutionThe SELECT DISTINCT stamen will returns distinct values. .pdfSolutionThe SELECT DISTINCT stamen will returns distinct values. .pdf
SolutionThe SELECT DISTINCT stamen will returns distinct values. .pdf
 
Starting from the topmost column,1. Cerebellum2. Spinocerebellar.pdf
Starting from the topmost column,1. Cerebellum2. Spinocerebellar.pdfStarting from the topmost column,1. Cerebellum2. Spinocerebellar.pdf
Starting from the topmost column,1. Cerebellum2. Spinocerebellar.pdf
 
Rheumatic fever shows various symptoms and signs, out of which sore .pdf
Rheumatic fever shows various symptoms and signs, out of which sore .pdfRheumatic fever shows various symptoms and signs, out of which sore .pdf
Rheumatic fever shows various symptoms and signs, out of which sore .pdf
 
Physiological responce are those in which the functions of the body .pdf
Physiological responce are those in which the functions of the body .pdfPhysiological responce are those in which the functions of the body .pdf
Physiological responce are those in which the functions of the body .pdf
 
NaF is the only oneSolutionNaF is the only one.pdf
NaF is the only oneSolutionNaF is the only one.pdfNaF is the only oneSolutionNaF is the only one.pdf
NaF is the only oneSolutionNaF is the only one.pdf
 
okkkSolutionokkk.pdf
okkkSolutionokkk.pdfokkkSolutionokkk.pdf
okkkSolutionokkk.pdf
 
Minimum IQ is 131SolutionMinimum IQ is 131.pdf
Minimum IQ is 131SolutionMinimum IQ is 131.pdfMinimum IQ is 131SolutionMinimum IQ is 131.pdf
Minimum IQ is 131SolutionMinimum IQ is 131.pdf
 
co2 because of the sqrt of their molar mases.. .pdf
                     co2 because of the sqrt of their molar mases..   .pdf                     co2 because of the sqrt of their molar mases..   .pdf
co2 because of the sqrt of their molar mases.. .pdf
 
L{e^{-t}} = int _0 to infinty [e^{st}e^{-t} dt = int _0 to infinty .pdf
L{e^{-t}} = int _0 to infinty [e^{st}e^{-t} dt = int _0 to infinty .pdfL{e^{-t}} = int _0 to infinty [e^{st}e^{-t} dt = int _0 to infinty .pdf
L{e^{-t}} = int _0 to infinty [e^{st}e^{-t} dt = int _0 to infinty .pdf
 
carbon forms 4 hydrogen forms 1 nitrogen forms 3 .pdf
                     carbon forms 4 hydrogen forms 1 nitrogen forms 3 .pdf                     carbon forms 4 hydrogen forms 1 nitrogen forms 3 .pdf
carbon forms 4 hydrogen forms 1 nitrogen forms 3 .pdf
 
H = H(lattice) + H(first ionisation) +H(second ionization) +2H(elec.pdf
H = H(lattice) + H(first ionisation) +H(second ionization) +2H(elec.pdfH = H(lattice) + H(first ionisation) +H(second ionization) +2H(elec.pdf
H = H(lattice) + H(first ionisation) +H(second ionization) +2H(elec.pdf
 
Heptatomic molecules contain 7 atomsNo. of H atoms = 2No. of S .pdf
Heptatomic molecules contain 7 atomsNo. of H atoms = 2No. of S .pdfHeptatomic molecules contain 7 atomsNo. of H atoms = 2No. of S .pdf
Heptatomic molecules contain 7 atomsNo. of H atoms = 2No. of S .pdf
 
ExperimentRegionTissue expressedConclusion1ABCLIVER.pdf
ExperimentRegionTissue expressedConclusion1ABCLIVER.pdfExperimentRegionTissue expressedConclusion1ABCLIVER.pdf
ExperimentRegionTissue expressedConclusion1ABCLIVER.pdf
 
D . All of the above could be reported within the fund financial sta.pdf
D . All of the above could be reported within the fund financial sta.pdfD . All of the above could be reported within the fund financial sta.pdf
D . All of the above could be reported within the fund financial sta.pdf
 
CIRT is necesary because the problems may come unknowingly but it ha.pdf
CIRT is necesary because the problems may come unknowingly but it ha.pdfCIRT is necesary because the problems may come unknowingly but it ha.pdf
CIRT is necesary because the problems may come unknowingly but it ha.pdf
 

Recently uploaded

Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
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
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 

Recently uploaded (20)

Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
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
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 

Codeclass Main { public static void main(String[] args) { dou.pdf

  • 1. Code: class Main { public static void main(String[] args) { double[] p = new double[12]; p[1] = 100; int r = 5; for(int i=2; i < 12; i++){ p[i] = p[i-1]*(1+(r/100.0)); } System.out.println("Initial Population is : "+p[1]); System.out.println("Hour --> Population"); for(int i=2; i < 12; i++){ System.out.println(i-1+" --> "+p[i]); } } } Output: Solution Code: class Main { public static void main(String[] args) { double[] p = new double[12]; p[1] = 100; int r = 5; for(int i=2; i < 12; i++){ p[i] = p[i-1]*(1+(r/100.0)); } System.out.println("Initial Population is : "+p[1]); System.out.println("Hour --> Population"); for(int i=2; i < 12; i++){ System.out.println(i-1+" --> "+p[i]); } }