Write java program that prints asks the user to enter value

Assignment Help JAVA Programming
Reference no: EM131321643

Write a Java program that prints asks the user to enter a positive value (1 less than or equal to 200) and print each number up to that line, 1 per line with the following changes (SNAP CRACKLE POP).

• If a number is ***** by 2 (but not 3 or 5) print out SNAP instead of the integer.

• If a number is ***** by 3 (but not 2 or 5) print out CRACKLE instead of the integer.

• If a number is ***** by 5 (but not 2 or 3) print out POP instead of the integer.

• If a number is ***** by 2 and 3 (but not 5) print out SNAPCRACKLE instead of the integer.

• If a number is ***** by 2 and 5 (but not 3) print out SNAPPOP instead of the integer.

• If a number is ***** by 3 and 5 (but not 2) print out CRACKLEPOP instead of the integer.

• If a number is ***** by 2, 3, and 5 print out SNAPCRACKLEPOP instead of the integer.

Sample Runs:

Enter a positive value: 7

1

SNAP

CRACKLE

SNAP

POP

SNAPCRACKLE

7

Enter a positive value: 10

1

SNAP

CRACKLE

SNAP

POP

SNAPCRACKLE

7

SNAP

CRACKLE

SNAPPOP.

Reference no: EM131321643

Questions Cloud

How does an auditor evaluate these controls : In addition to understanding the Internal Controls present within your client's company, the auditor must also evaluate whether these controls are in place, and implemented - How does an auditor evaluate these controls to see that they are working ..
Why measurement important in testing of research hypotheses : Describe in your own words the meaning of Figure. Why is measurement so important in the testing of research hypotheses?
Magnitude of the force experienced : Two positive charges, Q1=16.2 C and Q2=25.1 C are placed a distance d=43.6 cm apart The magnitude of the force experienced by Q1 due to the charge Q2 is F=1.9226e13 N
Evaluate a specific derivative contract : Evaluate a specific derivative contract. Outline short- and long-term trading patterns in the specific contract. Explain factors that are currently affecting this derivative contract and specific risks and potential benefits to investing in this deri..
Write java program that prints asks the user to enter value : Write a Java program that prints asks the user to enter a positive value (1 less than or equal to 200) and print each number up to that line, 1 per line with the following changes (SNAP CRACKLE POP).
What will be the firm quick ratio after nelson has raised : The Nelson Company has $1,690,000 in current assets and $650,000 in current liabilities. Its initial inventory level is $390,000, and it will raise funds as additional notes payable and use them to increase inventory. What will be the firm's quick ra..
Identify the needs and basic elements in data warehousing : From your research, identify the needs, basic elements, and trends in data warehousing. Discuss how approaches to collecting data warehouse requirements can help the chosen organization in the decision-making process
Acceleration of a modified at wood machine : What is the magnitude of the acceleration of a modified Atwood machine if the mass of the cart is8kgand the hanging mass is15kg? (Useg= 9.8 m/s2.Express your answer to one decimal point.)
What are the differences in plant assets : What are the differences among valuation, depreciation, amortization, and depletion? Is it appropriate to calculate depreciation using two different methods? Why - What is the straight-line method of amortizing discount and premium on bonds payable..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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