SlideShare a Scribd company logo
1 of 4
Download to read offline
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 .docxajoy21
 
DS LAB RECORD.docx
DS LAB RECORD.docxDS LAB RECORD.docx
DS LAB RECORD.docxdavinci54
 
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.pdfoptokunal1
 
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 .pdfdeepakangel
 
Lab01.pptx
Lab01.pptxLab01.pptx
Lab01.pptxKimVeeL
 
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 -2Ankit 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-.docxlauracallander
 
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.pdfaparnatiwari291
 

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.pdfanithacells
 
6.022142Solution6.022142.pdf
6.022142Solution6.022142.pdf6.022142Solution6.022142.pdf
6.022142Solution6.022142.pdfanithacells
 
35Solution35.pdf
35Solution35.pdf35Solution35.pdf
35Solution35.pdfanithacells
 
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.pdfanithacells
 
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.pdfanithacells
 
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.pdfanithacells
 
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.pdfanithacells
 
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.pdfanithacells
 
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 .pdfanithacells
 
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.pdfanithacells
 
oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf
                     oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf                     oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdf
oxidesNa2O,MgO peroxidesK2O2,H2O2 superoxidesC.pdfanithacells
 
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.pdfanithacells
 
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.pdfanithacells
 
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 .pdfanithacells
 
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.pdfanithacells
 
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 .pdfanithacells
 
• 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.pdfanithacells
 
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.pdfanithacells
 
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..pdfanithacells
 
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).pdfanithacells
 

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

e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 

Recently uploaded (20)

e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 

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