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

  Implement a personal scheduler windows application

Implement a personal scheduler Windows application - Entries can be enabled and disabled: Enabled schedule entries appear dark in the main window, and disabled entries appear grayed out in the list.

  Evaluate an infix expression entered by the user

Spaces between tokens are allowed but not required. The program will repeatedly prompt the user for the value of x, displaying the value of the expression each time. When the user enters the letter q instead of a number, the program terminates.

  Object oriented programming-getting started with classes

Suppose you are car shopping and want to store information about possible choices. Model, and implement an automobile class. Use a UML drawing tool such as Umbrello or Microsoft Visio to create a class diagram. Your class should have at least cons..

  Write a java program that reads a five-line address

Write a Java program that reads a five-line address from an input file and produces an output file with the address repeated 50 times in three columns.

  Create a gui application with jframe

Place a JButton on the JFrame, and code its functionality so that every time the user clicks on the button one of the reasons is removed from a label.

  Write down an applet which displays a 4x4 grid when the

write an applet that displays a 4x4 grid. when the user clicks on a square in the grid the applet should draw a filled

  What is overloading and what is overriding

What is overloading and what is overriding? Please use code to explain it.

  Explore how to throw and rethrow and exception

We will explore how to throw and rethrow and exception, and how to handle events in a program.  Please respond to all of the following prompts:Discuss whether it is it possible

  Assignment 1java tic-tac-toe game assignment 1 is

assignment 1java tic-tac-toe game assignment 1 is attachedattachment-nbsptic tac toe game.docxthis assignment consists

  Implement the scan, c_scan, and look disk scheduling algo

The code must have a separate method for each scheduling algorithm and they all have to be called from the main() method.

  Give two different ijvm translations for the given java code

Give two different IJVM translations for the following Java statement: i = k + n + 5; Give the Java statement that produced the following IJVM code:

  Compute the daily wage of an employee

Write a JAVA program that will input Employee Name, Rate per hour, No. of hours worked and will compute the daily wage of an employee. If the number of hours worked exceeds eight hours add 30% to each excess hours as overtime rate. Formula: Daily ..

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