Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

public class PeopleWeights

import java.util.Scanner;

public class PeopleWeights {

   public static void main(String[] args) {

Need assignment help for this question?

If you need assistance with writing your essay, we are ready to help you!

OUR PROCESS

Order

Payment

Writing

Delivery

Why Choose Us: Cost-efficiency, Plagiarism free, Money Back Guarantee, On-time Delivery, Total Сonfidentiality, 24/7 Support, 100% originality

        double sum = 0;

        double highest = 0;

         double [] v=new double[10];

         Scanner scanner = new Scanner(System.in);

         for(inti=0;i<5;i++){

System.out.println(“Enter weight “+(i+1)+”: “);

         v[i] = scanner.nextFloat();

        }

System.out.print(“\nYou entered: “);

         for(inti=0;i<5;i++){      

System.out.printf(“%.02f “,v[i]);

         sum = sum+v[i];   //find sum

         //comparing each time entered number with large one

         if(v[i] > highest)

         highest = v[i];

         }

         double average=(double)sum/5;

System.out.printf(“\nTotal weight: %.02f  “,sum);

System.out.printf(“\nAverage weight: %.02f “,average);

System.out.printf(“\nMax weight: %.02f “,highest);

    }

}

 
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"