I got it all done!
Basically what I did was, I changed the months to String variables and I could return it just perfectly!
Thank you Norm for you help,
Truly appreciated!
Type: Posts; User: Xoratia
I got it all done!
Basically what I did was, I changed the months to String variables and I could return it just perfectly!
Thank you Norm for you help,
Truly appreciated!
public static void main(String[] args)
{
double[] months = new double[12];
double[] rainfall = new double[12];
Scanner keyboard = new Scanner(System.in);
for (int index = 0;...
That really helped!
Although, I got the program to compile correctly, I'm having a logical error.
I can't get the program to grab which month had the most and least rain.
C:\Users\PSY\Desktop\Rainfall.java:38: error: double cannot be dereferenced
for (int index = 0; index < rainfall.length; index++)
^...
Write a program that stores the total rainfall for each of 12 months into an array of doubles. The program should have methods that return the following:
the total rainfall for the year.
the...