Use a loop to allow a user to enter a series of numbers

Assignment Help JAVA Programming
Reference no: EM13166599

Use a loop to allow a user to enter a series of numbers and then print out the series of numbers when the user is done. The user stops the lseries program by entering -1 (or any negative number).

The program should allow me to enter any number of positve integers until I enter -1 and then the program prints the series of numbers I entered.

You are not supposed to use an array. I honestly do not know how to do this. I understand how to continue asking the user for inputs and I understand how to terminate the program, but how to print out all the numbers is befuddling me.

 

 

Reference no: EM13166599

Questions Cloud

What these three things(rob, rs, rsr) explain : What these three things(ROB, RS, RSR)  explain  ?
Filling all the positions of his cabinet : How many ways are there of filling all the positions of his cabinet if we assume that each position be filled by a different person and do not take into account which position each been has been assigned?
Modify the btod procedure : Modify the BTOD procedure so that leading zeros are replaced by blanks. For example, if the result is "0" - "5" - "9," the leading 0 in the hundreds position gets replaced by a blank, giving " " - "5" - "9."
Non-finitely-describable languages closed underconcatenation : Are the non-finitely-describable languages closed under concatenation? Kleene closure? Complementation? Union?
Use a loop to allow a user to enter a series of numbers : Use a loop to allow a user to enter a series of numbers and then print out the series of numbers when the user is done. The user stops the lseries program by entering -1 (or any negative number).
Prints out a summary for a list of prescriptions : Create a class that prints out a summary for a list of prescriptions. Using your Prescription class and some if statements you will read in 3 prescriptions and print out an appropriate summary with a list of the prescriptions
Has this network been sub-netted : Assume a host computer has the following configuration: IP Address: 145.20.110.176 Subnet Mask: 255.255.0.0 Default Gateway: 145.20.1.1 a. What is the Class of this network?
Extended grep for regular expressions : That contain the word "as" exactly onceb) that contain the word "sa" more than once
What ip range would an isp provide to a customer : Using the IP ranges below: 245.0.0.0/8 225.113.9.0/25 169.254.137.0/25 192.168.0.0/16 172.16.0.0/24 10.0.0.0/8 245.125.1378.0/24 215.154.10.0/24 225.113.8.0/24 127.0.0.0/8 10.0.0.0/24 a)

Reviews

Write a Review

JAVA Programming Questions & Answers

  Evaluate the rtas resource requirements

Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements.

  Productexception class whose constructor

Create a ProductException class whose constructor receives a String that consists of a product number and price. Save the file as ProductException.java. Create a Product class with two fields, productNum and price. The Product constructor requires va..

  The string class and/or the stringbuffer class in java

Create a simple Java application that uses the String class and/or the StringBuffer class and at least 4 of the class methods. Show the code, demonstrate it works properly and describe what it is doing.

  Record managing system application

Build a student record managing system application

  Write an application that extends jframe

Write an application that extends JFrame and that displays a phrase in every font size from 6 through 20.

  Class sorter which contains methods for selection sort

Write a class Sorter which contains methods for selection sort, insertion sort and bubble sort (start with the code below). Then create a client class which asks user to enter ten numbers using arrays. Then the program asks user which sorting algo..

  Write a java application to ask number of assignments

Write a java application that accomplishes the following tasks with built in exception handling: ask the number of homework assignment students have submitted in a semester

  The data file being used contains records

The data file being used contains records with an employee's name, the number of hours they worked, and their hourly pay rate. Write a program to read the records of information and output (to the Output window or a dialog box) the employee's name..

  Pass in the number of gallons on board

public float usefulLoad() // this is the grossWeight - emptyWeight public float usefulLoadWithFuel( in gallons ) // this is the useful load - gallons x 6. The programmer user will pass in the number of gallons on board.

  Print the contents of the array

Prepare a second loop that prints the contents of the array

  Design and implement a sorting algorithm

Your task is to design and implement a sorting algorithm and running time grows as a linear function of the array

  What position along the chord does minimum pressure occur

At what position along the chord does the minimum pressure occur? What is special about the point where C p is a maximum?

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