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

  Displays the number of days in a month

Create a program that displays the number of days in a month. Use a 12-element one-dimensional array to store the number of days in each month (use 28 for the number of days in February).

  Create a java class called samearraysexception

Create a Java class called SameArraysException that extends the Exception class.

  Create application uses two-dimensional arrays

Create an application which uses 2-dimensional arrays to keep track of 5 students' grades, with each student having 3 different classes.

  An infix to postfix method for my java program.

an infixToPostFix method for my java program. The method must work with stacks and it should take a string as parameter. The method should be able to convert to postfix mathematic expressions such as: (12 + 4) - 23(9-6)/12. Treat the parenthesis as l..

  Create java application-input miles driven and gallons used

Create Java application which will input miles driven and gallons used (both as integers) for each tankful. Program must compute and display miles per gallon obtained for each tankful.

  Design a class named large integers

Design a class named largeIntegers such that an object of this class can store an integer of any number of digits.

  Write down ijvm code to remove top two words from stack

Write down IJVM code which will remove these top two words, multiply and put their product back on stack. You are allowed to use existing IJVM instructions only.

  Tracer for java

Implementation of a tracer of Java objects and the tracer can be invoked from any point of a Java program, accepting an object as argument.

  Mean and standard deviation using using eclipse

Java programming to calculate Mean and standard deviation using Using Eclipse.

  Identify the 5 code elements

Identify the 5 code elements for a Password class. Things like: class, instance, and final variables, accessor and mutator method, public and private specifiers for methods and member variables.i need to provide detail and descriptions for each code ..

  Using a linked implementation of graph write a method

Write a method that takes two nodes as input and returns true if joining an edge between these two nodes, forms a duplicate path to one of the input nodes within the graph.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

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