Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

7.8) write a java statement to accomplisheach ofthe following tasks: a) display

ID: 3617431 • Letter: 7

Question

7.8) write a java statement to accomplisheach ofthe following tasks: a) display the value of element 6 of array f b) Initialize each of the five elements of one-dimensionalinteger array g to 8 c) total the 100 elements of floating-point array c d) copy 11-element array a into the first portion ofarray b, whick contains 34 elements e) determin and display the smallest and largest valuescontained in 99-element floating- point array w i need this fairly soon plz i'm getting slammed with homeworkassignments thanks 7.8) write a java statement to accomplisheach ofthe following tasks: a) display the value of element 6 of array f b) Initialize each of the five elements of one-dimensionalinteger array g to 8 c) total the 100 elements of floating-point array c d) copy 11-element array a into the first portion ofarray b, whick contains 34 elements e) determin and display the smallest and largest valuescontained in 99-element floating- point array w i need this fairly soon plz i'm getting slammed with homeworkassignments thanks

Explanation / Answer


a) System.out.println(f[5]); //index 5 because, index starts from0

b) g = {8,8,8,8,8};

c)
float sum = 0;
for(int v=0;v<100;v++)
  sum +=c[v];


d)
for(int v = 0;v<11;v++)
   b[v]=a[v];

e)
float smallest = w[0]; //first value is supposed the lowest andhighest.
float largest = w[0];
for(int v=0;v<=99;v++)
{
   if(w[v]>largest)
      largest=w[v];
   
if(w[v]<smallest)
      smallest=w[v];
}
System.out.println("Largest value is : "+largest);
System.out.println("Smallest value is: "+smallest);

a) System.out.println(f[5]); //index 5 because, index starts from0

b) g = {8,8,8,8,8};

c)
float sum = 0;
for(int v=0;v<100;v++)
  sum +=c[v];


d)
for(int v = 0;v<11;v++)
   b[v]=a[v];

e)
float smallest = w[0]; //first value is supposed the lowest andhighest.
float largest = w[0];
for(int v=0;v<=99;v++)
{
   if(w[v]>largest)
      largest=w[v];
   
if(w[v]<smallest)
      smallest=w[v];
}
System.out.println("Largest value is : "+largest);
System.out.println("Smallest value is: "+smallest);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote