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

  Write a java program using array to auto-grade exams

Write a JAVA program using 2D Array to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C, D) for each student.

  Eclipse or netbeans environments

As recommendation, you can try to use Eclipse or NetBeans environments that are used also for other courses as: Introduction in Java programming and Intermediate programming.

  Write jvm program which accepts rpn expression

Write down the IJVM program which accepts RPN expression, with each operand and operator entered line by line. As each number (operand) is entered, push it on stack.

  Design a program that extends the definition of the class

Design a program that extends the definition of the class JFrame to display a window on the screen. Name your class PropertyTax1, title your window "Calculation of Property Taxes," set the window's width to 400 pixels and height to 300 pixels, and te..

  To translate infix mathematical expression

Write a program in java to translate infix mathematical expression into postfix expression and a program to evaluate the postfix expression

  Create simulation by java language for single-server queue

Suppose that customer inter-arrival times are exponentially distributed and service times are normally distributed. Create simulation by java language for this problem and view all parametre?

  Elliptic curve encryption

write a program to implement Elliptic Curve encryption/decryption and program will read parameters, plaintext and ciphertextfrom a file named "input.txt" (under the same directory).

  Write down java console application to add new student

Write down java console application presents the following menu. Add new student and scores in Biology, Physics and chemistry Search for a given student.

  Write a java program to register students for a college

Project is for designing and developing a College Registration program. Write a Java program to register students for a college

  Write a java program that uses a search tree of strings

Write a Java program that uses a search tree of strings to sort text lines in alphabetic order. You may choose how you de?ne alphabetic order as long as there is some sense in the de?nition. You may also choose what kind of tree you use.

  The drink machine should have a supply

When the applet starts, the drink machine should have a supply of 20 of each of the drinks. The applet should have a text field where the user can enter the amount of money he or she is giving the machine. The user can then click on a button to selec..

  Can linear search algorithm be encoded using recursion

Determine the average amount of time people spend waiting for tables and provide examples from the "real world" of unsorted lists, sorted lists, indexed lists, lists that permit duplicate elements, and lists that do not permit duplicate elements

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