Write a program using an array that will store

Assignment Help JAVA Programming
Reference no: EM13164906

Using java programing : Write a program using an array that will store input data. Prompt the user for and read 6 numbers between 70 and 90. Verify the numbers should be greater than 70 and less than 90. If the number is less than or equal to 70 or greater than 90, reprompt for a valid value.

The output by using the array data:

  • Print all the elements of the array.
  • The average of all the elements of the array.
  • The minimum element with its index
  • The difference between the largest and smallest elements of the array.

Ive started with

import java.util.Scanner;

public class Lab12

{

   public static void main (String [] args)

{

   Scanner scan = new Scanner(System.in);

   double [] num= new double [6];

   for ( int i=0; i < num.length;i++)

   {

   while (num[i] <=70 || num [i] >90)

   {

 

   System.out.println("Enter a number grater bigger then 70 and less then 90 ");     

      num [i]= scan.nextInt();

 

}

}

}}

Reference no: EM13164906

Questions Cloud

Use a search engine to identify : Use a search engine to identify the positions of Google and Apple regarding cell phone tracking. What reasons do the give for tracking cell phones? What limitations do you think they might support?
How much heat is required to vaporize : How much heat is required to vaporize 55.0 of acetone at its boiling point? The heat of vaporization of acetone at its boiling point is 29.1.
Palindrome is a sequence of char that reads backward forwrd : A palindrome is a sequence of characters that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554, and 11611. Write an application called Palindrome.java that asks the user t..
How many grams of solvent are in the solution : You have 1005.3 g of a bleach solution. The percent by mass of the solute sodium hypochlorite, NaOCl, is 3.62%. How many grams of solvent are in the solution?
Write a program using an array that will store : Using java programing : Write a program using an array that will store input data. Prompt the user for and read 6 numbers between 70 and 90. Verify the numbers should be greater than 70 and less than 90. If the number is less than
What is mass in grams of the liquid propylene gylcol : what is the mass in grams of 30.0 mL of the liquid propylene gylcol, a moisturizing agent for foods, which has a density 1.036 g/mL at 25 degree Celsius.
State what by product might have formed : how might the addition of water helped convert this by product into the desired product?
What is the key value of the 4th index : What is the key value of the 4th index record on the top level, assuming each index record points to the record with the highest key value in a block of the next level down?
Create an array of objects from the provided code : Create an array of objects from the provided code and run a for loop to assign strings and numbers. In this assignment, I will need to see the main function. Make sure there is a default constructor.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Print the contents of the array

Prepare a second loop that prints the contents of the array

  Write a program that reads in a list of numbers from a file

write a program that reads in a list of numbers from a file and adds up all those numbers. You may hard code in the name of the file, allowing the user to input the filename is not required

  Write a java applet for grade of gas in costco gas station

Write a java applet (not a java application program) for costco gas station. The applet will first ask you whether you are a costco customer, then the grade of gas you want to use.

  Your letterinventory class must use an array

Your LetterInventory class must use an array of Counter objects. Note that there is no nextChar method in the Scanner class. You must use the next() method and then use a loop through the characters of the token that is returned. Ignore any character..

  Java program to find solution of cryptarithmetic puzzle

A solution to puzzle is S=9, R=8, O=0, M=1, Y=2, E=5, N=6, D=7. Write down a java program which finds solution to cryptarithmetic puzzle of: TOO + TOO + TOO + TOO = GOOD.

  I had to call a webservice

I had to call a webservice (1st line of code) and then from there created a loop but keep getting an error every time on the .getBusiness - I don't know what I should be using there instead of getBusiness.

  Design and implement an applet called circles

Design and implement an applet called Circles that draws 50 circles of random diameter in random locations. If the diameter of a circle is less than a certain value, the circle is ?lled with the color yellow.

  Build the gui layout of the game

Build the Build the GUI layout of the game in java.

  Define private instance variable to hold boolean value

Write a Java Enumeration "LetterGrade" that represents letter grades A through F including plus and minus grades. Define a private instance variable to hold a boolean value.

  Personalize the time zone application of section 24.3

Personalize the time zone application of Section 24.3. Prompt the user to log in and specify a city to be stored in a profile. The next time the user logs in, the time of their favorite city is displayed automatically.

  What is the average response time for this system?

A web server receives a request every 50ms and processes web requests every 8 ms. Using queuing theory, 1. What is the average response time for this system?

  Distributed systems

Build robust, secure distributed systems using advanced programming techniques

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd