SlideShare a Scribd company logo
RainfallTest.java
import java.util.Arrays;
import java.util.Scanner;
public class RainFallDetails {
static String month[] = {"January", "Fabruary", "March", "April", "May", "June",
"July", "August", "September","October","November","December"};
public static void main(String[] args) {
int months[] = new int[12];
Scanner scan = new Scanner(System.in);
for(int i=0; i months[i]){
min = months[i];
minIndex = i;
}
}
System.out.println("The minimum rainfall is :"+min);
System.out.println("The minimum rainfall month is :"+month[minIndex]);
}
}
Output:
Enter Rainfall for the month 1:
33
Enter Rainfall for the month 2:
22
Enter Rainfall for the month 3:
11
Enter Rainfall for the month 4:
44
Enter Rainfall for the month 5:
55
Enter Rainfall for the month 6:
66
Enter Rainfall for the month 7:
77
Enter Rainfall for the month 8:
88
Enter Rainfall for the month 9:
99
Enter Rainfall for the month 10:
12
Enter Rainfall for the month 11:
14
Enter Rainfall for the month 12:
15
Entered rainfall details [33, 22, 11, 44, 55, 66, 77, 88, 99, 12, 14, 15]
January: 33
Fabruary: 22
March: 11
April: 44
May: 55
June: 66
July: 77
August: 88
September: 99
October: 12
November: 14
December: 15
The total rainfall is :536
The average rainfall is :44.666666666666664
The maximum rainfall is :99
The maximum rainfall month is :September
The minimum rainfall is :11
The minimum rainfall month is :March
Solution
RainfallTest.java
import java.util.Arrays;
import java.util.Scanner;
public class RainFallDetails {
static String month[] = {"January", "Fabruary", "March", "April", "May", "June",
"July", "August", "September","October","November","December"};
public static void main(String[] args) {
int months[] = new int[12];
Scanner scan = new Scanner(System.in);
for(int i=0; i months[i]){
min = months[i];
minIndex = i;
}
}
System.out.println("The minimum rainfall is :"+min);
System.out.println("The minimum rainfall month is :"+month[minIndex]);
}
}
Output:
Enter Rainfall for the month 1:
33
Enter Rainfall for the month 2:
22
Enter Rainfall for the month 3:
11
Enter Rainfall for the month 4:
44
Enter Rainfall for the month 5:
55
Enter Rainfall for the month 6:
66
Enter Rainfall for the month 7:
77
Enter Rainfall for the month 8:
88
Enter Rainfall for the month 9:
99
Enter Rainfall for the month 10:
12
Enter Rainfall for the month 11:
14
Enter Rainfall for the month 12:
15
Entered rainfall details [33, 22, 11, 44, 55, 66, 77, 88, 99, 12, 14, 15]
January: 33
Fabruary: 22
March: 11
April: 44
May: 55
June: 66
July: 77
August: 88
September: 99
October: 12
November: 14
December: 15
The total rainfall is :536
The average rainfall is :44.666666666666664
The maximum rainfall is :99
The maximum rainfall month is :September
The minimum rainfall is :11
The minimum rainfall month is :March

More Related Content

Similar to RainfallTest.javaimport java.util.Arrays; import java.util.Scann.pdf

Write a program that uses nested loops to collect data and calculate .docx
 Write a program that uses nested loops to collect data and calculate .docx Write a program that uses nested loops to collect data and calculate .docx
Write a program that uses nested loops to collect data and calculate .docx
ajoy21
 
DS LAB RECORD.docx
DS LAB RECORD.docxDS LAB RECORD.docx
DS LAB RECORD.docx
davinci54
 
import java.util.;public class Program{public static void.pdf
import java.util.;public class Program{public static void.pdfimport java.util.;public class Program{public static void.pdf
import java.util.;public class Program{public static void.pdf
optokunal1
 
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdfFactors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
deepakangel
 
programming for Calculator in java
programming for Calculator in javaprogramming for Calculator in java
programming for Calculator in java
One97 Communications Limited
 
Lab01.pptx
Lab01.pptxLab01.pptx
Lab01.pptx
KimVeeL
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
MaruMengesha
 
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
Nithin Kumar,VVCE, Mysuru
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
Ankit Gupta
 
An input file A1-txt is given which contains a list of integer values-.docx
An input file A1-txt is given which contains a list of integer values-.docxAn input file A1-txt is given which contains a list of integer values-.docx
An input file A1-txt is given which contains a list of integer values-.docx
lauracallander
 
WAP to add two given matrices in Java
WAP to add two given matrices in JavaWAP to add two given matrices in Java
WAP to add two given matrices in Java
One97 Communications Limited
 
CountPositiveNumbersInArray.javapackage org.students;import java.pdf
CountPositiveNumbersInArray.javapackage org.students;import java.pdfCountPositiveNumbersInArray.javapackage org.students;import java.pdf
CountPositiveNumbersInArray.javapackage org.students;import java.pdf
aparnatiwari291
 

Similar to RainfallTest.javaimport java.util.Arrays; import java.util.Scann.pdf (12)

Write a program that uses nested loops to collect data and calculate .docx
 Write a program that uses nested loops to collect data and calculate .docx Write a program that uses nested loops to collect data and calculate .docx
Write a program that uses nested loops to collect data and calculate .docx
 
DS LAB RECORD.docx
DS LAB RECORD.docxDS LAB RECORD.docx
DS LAB RECORD.docx
 
import java.util.;public class Program{public static void.pdf
import java.util.;public class Program{public static void.pdfimport java.util.;public class Program{public static void.pdf
import java.util.;public class Program{public static void.pdf
 
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdfFactors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
 
programming for Calculator in java
programming for Calculator in javaprogramming for Calculator in java
programming for Calculator in java
 
Lab01.pptx
Lab01.pptxLab01.pptx
Lab01.pptx
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
 
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
 
An input file A1-txt is given which contains a list of integer values-.docx
An input file A1-txt is given which contains a list of integer values-.docxAn input file A1-txt is given which contains a list of integer values-.docx
An input file A1-txt is given which contains a list of integer values-.docx
 
WAP to add two given matrices in Java
WAP to add two given matrices in JavaWAP to add two given matrices in Java
WAP to add two given matrices in Java
 
CountPositiveNumbersInArray.javapackage org.students;import java.pdf
CountPositiveNumbersInArray.javapackage org.students;import java.pdfCountPositiveNumbersInArray.javapackage org.students;import java.pdf
CountPositiveNumbersInArray.javapackage org.students;import java.pdf
 

More from anithacells

5. The normal route of transmission of Paramyxo virus is droplets or.pdf
5. The normal route of transmission of Paramyxo virus is droplets or.pdf5. The normal route of transmission of Paramyxo virus is droplets or.pdf
5. The normal route of transmission of Paramyxo virus is droplets or.pdf
anithacells
 
6.022142Solution6.022142.pdf
6.022142Solution6.022142.pdf6.022142Solution6.022142.pdf
6.022142Solution6.022142.pdf
anithacells
 
35Solution35.pdf
35Solution35.pdf35Solution35.pdf
35Solution35.pdf
anithacells
 
1. C. Mycorrhiza can transport sugars between different plants.Thi.pdf
1. C. Mycorrhiza can transport sugars between different plants.Thi.pdf1. C. Mycorrhiza can transport sugars between different plants.Thi.pdf
1. C. Mycorrhiza can transport sugars between different plants.Thi.pdf
anithacells
 
1.Petals They are the part of flower that appear conspicuously, o.pdf
1.Petals They are the part of flower that appear conspicuously, o.pdf1.Petals They are the part of flower that appear conspicuously, o.pdf
1.Petals They are the part of flower that appear conspicuously, o.pdf
anithacells
 
A type I error, also known as an error of the first kind, occurs wh.pdf
 A type I error, also known as an error of the first kind, occurs wh.pdf A type I error, also known as an error of the first kind, occurs wh.pdf
A type I error, also known as an error of the first kind, occurs wh.pdf
anithacells
 
Q1. Fundamental niche Q2. Presence of a cellulose matrix to hold.pdf
    Q1. Fundamental niche   Q2. Presence of a cellulose matrix to hold.pdf    Q1. Fundamental niche   Q2. Presence of a cellulose matrix to hold.pdf
Q1. Fundamental niche Q2. Presence of a cellulose matrix to hold.pdf
anithacells
 
D orbitals are only available to atoms in rows 3-7. D orbitals only.pdf
  D orbitals are only available to atoms in rows 3-7.  D orbitals only.pdf  D orbitals are only available to atoms in rows 3-7.  D orbitals only.pdf
D orbitals are only available to atoms in rows 3-7. D orbitals only.pdf
anithacells
 
Zeff - dec going down, inc going across IE - inc .pdf
                     Zeff - dec going down, inc going across IE - inc .pdf                     Zeff - dec going down, inc going across IE - inc .pdf
Zeff - dec going down, inc going across IE - inc .pdf
anithacells
 
There are diastereomers. note Diastereomers (som.pdf
                     There are diastereomers. note Diastereomers (som.pdf                     There are diastereomers. note Diastereomers (som.pdf
There are diastereomers. note Diastereomers (som.pdf
anithacells
 
oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf
                     oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf                     oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf
oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf
anithacells
 
Nuclear Fusion and please rate me Helpful atleast.pdf
                     Nuclear Fusion and please rate me Helpful atleast.pdf                     Nuclear Fusion and please rate me Helpful atleast.pdf
Nuclear Fusion and please rate me Helpful atleast.pdf
anithacells
 
K2S potassium sulfide. This is an ordinary ionic.pdf
                     K2S potassium sulfide. This is an ordinary ionic.pdf                     K2S potassium sulfide. This is an ordinary ionic.pdf
K2S potassium sulfide. This is an ordinary ionic.pdf
anithacells
 
I believe you are missing the delocalized double .pdf
                     I believe you are missing the delocalized double .pdf                     I believe you are missing the delocalized double .pdf
I believe you are missing the delocalized double .pdf
anithacells
 
Florenone is polar compound and Flourene is nonpo.pdf
                     Florenone is polar compound and Flourene is nonpo.pdf                     Florenone is polar compound and Flourene is nonpo.pdf
Florenone is polar compound and Flourene is nonpo.pdf
anithacells
 
Equivalent Lewis structures are called resonance .pdf
                     Equivalent Lewis structures are called resonance .pdf                     Equivalent Lewis structures are called resonance .pdf
Equivalent Lewis structures are called resonance .pdf
anithacells
 
• Students who earn less than a “C” in an upper-division business or.pdf
• Students who earn less than a “C” in an upper-division business or.pdf• Students who earn less than a “C” in an upper-division business or.pdf
• Students who earn less than a “C” in an upper-division business or.pdf
anithacells
 
Benzene differs from water because it is nonpolar.pdf
                     Benzene differs from water because it is nonpolar.pdf                     Benzene differs from water because it is nonpolar.pdf
Benzene differs from water because it is nonpolar.pdf
anithacells
 
Yes it is.SolutionYes it is..pdf
Yes it is.SolutionYes it is..pdfYes it is.SolutionYes it is..pdf
Yes it is.SolutionYes it is..pdf
anithacells
 
X follows U (0, pi2) P(X x ) = 2xpi for 0 x pi2 Y =sin(X).pdf
X follows U (0, pi2) P(X x ) = 2xpi for 0 x pi2 Y =sin(X).pdfX follows U (0, pi2) P(X x ) = 2xpi for 0 x pi2 Y =sin(X).pdf
X follows U (0, pi2) P(X x ) = 2xpi for 0 x pi2 Y =sin(X).pdf
anithacells
 

More from anithacells (20)

5. The normal route of transmission of Paramyxo virus is droplets or.pdf
5. The normal route of transmission of Paramyxo virus is droplets or.pdf5. The normal route of transmission of Paramyxo virus is droplets or.pdf
5. The normal route of transmission of Paramyxo virus is droplets or.pdf
 
6.022142Solution6.022142.pdf
6.022142Solution6.022142.pdf6.022142Solution6.022142.pdf
6.022142Solution6.022142.pdf
 
35Solution35.pdf
35Solution35.pdf35Solution35.pdf
35Solution35.pdf
 
1. C. Mycorrhiza can transport sugars between different plants.Thi.pdf
1. C. Mycorrhiza can transport sugars between different plants.Thi.pdf1. C. Mycorrhiza can transport sugars between different plants.Thi.pdf
1. C. Mycorrhiza can transport sugars between different plants.Thi.pdf
 
1.Petals They are the part of flower that appear conspicuously, o.pdf
1.Petals They are the part of flower that appear conspicuously, o.pdf1.Petals They are the part of flower that appear conspicuously, o.pdf
1.Petals They are the part of flower that appear conspicuously, o.pdf
 
A type I error, also known as an error of the first kind, occurs wh.pdf
 A type I error, also known as an error of the first kind, occurs wh.pdf A type I error, also known as an error of the first kind, occurs wh.pdf
A type I error, also known as an error of the first kind, occurs wh.pdf
 
Q1. Fundamental niche Q2. Presence of a cellulose matrix to hold.pdf
    Q1. Fundamental niche   Q2. Presence of a cellulose matrix to hold.pdf    Q1. Fundamental niche   Q2. Presence of a cellulose matrix to hold.pdf
Q1. Fundamental niche Q2. Presence of a cellulose matrix to hold.pdf
 
D orbitals are only available to atoms in rows 3-7. D orbitals only.pdf
  D orbitals are only available to atoms in rows 3-7.  D orbitals only.pdf  D orbitals are only available to atoms in rows 3-7.  D orbitals only.pdf
D orbitals are only available to atoms in rows 3-7. D orbitals only.pdf
 
Zeff - dec going down, inc going across IE - inc .pdf
                     Zeff - dec going down, inc going across IE - inc .pdf                     Zeff - dec going down, inc going across IE - inc .pdf
Zeff - dec going down, inc going across IE - inc .pdf
 
There are diastereomers. note Diastereomers (som.pdf
                     There are diastereomers. note Diastereomers (som.pdf                     There are diastereomers. note Diastereomers (som.pdf
There are diastereomers. note Diastereomers (som.pdf
 
oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf
                     oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf                     oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf
oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf
 
Nuclear Fusion and please rate me Helpful atleast.pdf
                     Nuclear Fusion and please rate me Helpful atleast.pdf                     Nuclear Fusion and please rate me Helpful atleast.pdf
Nuclear Fusion and please rate me Helpful atleast.pdf
 
K2S potassium sulfide. This is an ordinary ionic.pdf
                     K2S potassium sulfide. This is an ordinary ionic.pdf                     K2S potassium sulfide. This is an ordinary ionic.pdf
K2S potassium sulfide. This is an ordinary ionic.pdf
 
I believe you are missing the delocalized double .pdf
                     I believe you are missing the delocalized double .pdf                     I believe you are missing the delocalized double .pdf
I believe you are missing the delocalized double .pdf
 
Florenone is polar compound and Flourene is nonpo.pdf
                     Florenone is polar compound and Flourene is nonpo.pdf                     Florenone is polar compound and Flourene is nonpo.pdf
Florenone is polar compound and Flourene is nonpo.pdf
 
Equivalent Lewis structures are called resonance .pdf
                     Equivalent Lewis structures are called resonance .pdf                     Equivalent Lewis structures are called resonance .pdf
Equivalent Lewis structures are called resonance .pdf
 
• Students who earn less than a “C” in an upper-division business or.pdf
• Students who earn less than a “C” in an upper-division business or.pdf• Students who earn less than a “C” in an upper-division business or.pdf
• Students who earn less than a “C” in an upper-division business or.pdf
 
Benzene differs from water because it is nonpolar.pdf
                     Benzene differs from water because it is nonpolar.pdf                     Benzene differs from water because it is nonpolar.pdf
Benzene differs from water because it is nonpolar.pdf
 
Yes it is.SolutionYes it is..pdf
Yes it is.SolutionYes it is..pdfYes it is.SolutionYes it is..pdf
Yes it is.SolutionYes it is..pdf
 
X follows U (0, pi2) P(X x ) = 2xpi for 0 x pi2 Y =sin(X).pdf
X follows U (0, pi2) P(X x ) = 2xpi for 0 x pi2 Y =sin(X).pdfX follows U (0, pi2) P(X x ) = 2xpi for 0 x pi2 Y =sin(X).pdf
X follows U (0, pi2) P(X x ) = 2xpi for 0 x pi2 Y =sin(X).pdf
 

Recently uploaded

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
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
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
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
 

Recently uploaded (20)

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
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...
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
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
 

RainfallTest.javaimport java.util.Arrays; import java.util.Scann.pdf

  • 1. RainfallTest.java import java.util.Arrays; import java.util.Scanner; public class RainFallDetails { static String month[] = {"January", "Fabruary", "March", "April", "May", "June", "July", "August", "September","October","November","December"}; public static void main(String[] args) { int months[] = new int[12]; Scanner scan = new Scanner(System.in); for(int i=0; i months[i]){ min = months[i]; minIndex = i; } } System.out.println("The minimum rainfall is :"+min); System.out.println("The minimum rainfall month is :"+month[minIndex]); } } Output: Enter Rainfall for the month 1: 33 Enter Rainfall for the month 2: 22 Enter Rainfall for the month 3: 11 Enter Rainfall for the month 4: 44 Enter Rainfall for the month 5: 55 Enter Rainfall for the month 6: 66
  • 2. Enter Rainfall for the month 7: 77 Enter Rainfall for the month 8: 88 Enter Rainfall for the month 9: 99 Enter Rainfall for the month 10: 12 Enter Rainfall for the month 11: 14 Enter Rainfall for the month 12: 15 Entered rainfall details [33, 22, 11, 44, 55, 66, 77, 88, 99, 12, 14, 15] January: 33 Fabruary: 22 March: 11 April: 44 May: 55 June: 66 July: 77 August: 88 September: 99 October: 12 November: 14 December: 15 The total rainfall is :536 The average rainfall is :44.666666666666664 The maximum rainfall is :99 The maximum rainfall month is :September The minimum rainfall is :11 The minimum rainfall month is :March Solution RainfallTest.java import java.util.Arrays;
  • 3. import java.util.Scanner; public class RainFallDetails { static String month[] = {"January", "Fabruary", "March", "April", "May", "June", "July", "August", "September","October","November","December"}; public static void main(String[] args) { int months[] = new int[12]; Scanner scan = new Scanner(System.in); for(int i=0; i months[i]){ min = months[i]; minIndex = i; } } System.out.println("The minimum rainfall is :"+min); System.out.println("The minimum rainfall month is :"+month[minIndex]); } } Output: Enter Rainfall for the month 1: 33 Enter Rainfall for the month 2: 22 Enter Rainfall for the month 3: 11 Enter Rainfall for the month 4: 44 Enter Rainfall for the month 5: 55 Enter Rainfall for the month 6: 66 Enter Rainfall for the month 7: 77 Enter Rainfall for the month 8:
  • 4. 88 Enter Rainfall for the month 9: 99 Enter Rainfall for the month 10: 12 Enter Rainfall for the month 11: 14 Enter Rainfall for the month 12: 15 Entered rainfall details [33, 22, 11, 44, 55, 66, 77, 88, 99, 12, 14, 15] January: 33 Fabruary: 22 March: 11 April: 44 May: 55 June: 66 July: 77 August: 88 September: 99 October: 12 November: 14 December: 15 The total rainfall is :536 The average rainfall is :44.666666666666664 The maximum rainfall is :99 The maximum rainfall month is :September The minimum rainfall is :11 The minimum rainfall month is :March