Arrays program - Essay Example


Extract of sample
Arrays program

The program initializes the miles at the beginning of training to 2 and 26 at the end of the training. It then calculates the daily increment within the 8 weeks in the middle of week 1 and 10. It then uses loops to sum the total mileage after initializing it to 0 then gradually adding by the values in the array. It also uses loops to find out if 4 exists in the array and ejects the loop if it exists at a given index. using NetBeans IDE
public class BostonMarathon {

* @param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
int startMileage=2;
int endMileage=26;
//8 weeks excluding first and last week
int interval=(endMileage-startMileage)/8;
int weeklyMiles[]=new int[10];
for(int x=0;x ...
Download paper


This paper consist of a program which initializes the array with the appropriate number of values determining the value in the array element when the index contain 2 and calculating the sum of the total miles one spent running over the 10. …
Author : ymaggio
Download 0

Related Essays

Program Management
5 pages (1255 words) Essay
FEA program
5 pages (1255 words) Assignment
Mentoring Program
8 pages (2008 words) Research Proposal
FEA program
5 pages (1255 words) Assignment
FEA program
5 pages (1255 words) Assignment
1 pages (251 words) Assignment
MySQL program
2 pages (502 words) Essay
Got a tricky question? Receive an answer from students like you! Try us!