1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Naily [24]
2 years ago
9

Write a program that accepts two integers from the user and perform one of the four arithmetic operations based on user’s choice

: addition, subtraction, multiplication or division. For example,
Enter an integer: 5
Enter an integer: 2
Which operations would you like to perform? addition
The sum of two integers is 7.

Red parts are what user would type in.
However, if the user wants the program to divide by a 0, write a message that says, “You can’t divide by 0.”
Modify the program above so that the program continues to run until user enters “STOP”
Plz if anyone can help!
Computers and Technology
1 answer:
alex41 [277]2 years ago
6 0

Answer:

do you still need the answer? or am i to lateeee

Explanation:

You might be interested in
Open Comments.java and write a class that uses the command window to display the following statement about comments:
riadik2000 [5.3K]

Answer:

Answers to the code are given below with appropriate guidelines on definitions and how to properly run the code

Explanation:

//3 ways to comment are as follows:

//1. This is a one line comment.

/**

* 2. This is a documentation comment.

* @author Your name here

*

*/

/*

*3. This is a multiple line comment

* */

public class Comments {

//Driver method

public static void main(String[]args) {

/*

* All the text written inside the

* sysout method will be displayed on

* to the command prompt/console*/

System.out.println("Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n");

System.out.println("3 ways to add comments in JAVA are as follows: \n");

System.out.println("1. One line comment can be written as:\n//Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n");

System.out.println("2. MultiLine comment can be written as:\n/* Program comments are nonexecuting \n * statements you add to a file for the \n * purpose of documentation.\n */\n");

System.out.println("3. Documentation comment can be written as follows:\n/**\n * Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n **/");

}

}

Steps to Run:

1. Make file named Comments.java, and copy paste the above code.

2. Open command prompt and then go to the directory where you have saved the above created file.

3. The before running compile the code by using command

javac Comments.java

4. Now, run the code by the below command

java Comments.

Congrats your assignment is done!!

8 0
3 years ago
Which scenario would benefit most from being set up as a recurring appointment?
sveta [45]
The answer is b. Susan has an appointment with he co-worker on the first Monday of every month. This scenario would benefit from being set up as a recurring appointment, since it requires the same thing to be done every month on the same day. Susan is likely to forget this appointment every month, so a reminder like this would be useful for her. For the other cases, a recurring appointment would not be of much benefit since they do not follow a particular pattern time-wise.
3 0
3 years ago
Two technicians are discussing engine valve timing. Technician A says that the optimum valve timing is found through experimenta
nordsb [41]
The answer is B. A only. The optimum valve timing is found through experimentation using an engine dynamometer. The timing of the opening and closing of the valves is called valve timing. So the use of dynamometer measures the power output of a machine that is why it can measure the optimum valve timing.
7 0
3 years ago
Read 2 more answers
What are the diffrent types of contract
igomit [66]
<span>Fixed Price Contracts, Cost Reimbursable Contracts, and <span>Time and Material Contracts are the three basic types. Not to mention </span></span>Sale contracts, Employment contracts, business contracts, and leases.
4 0
3 years ago
JAVA
marshall27 [118]

Answer:

Answer is in the provided screenshot!

Explanation:

Steps required to solve this problem:

1 - define what characters are "vowels" by assigning them to an array.

2 - create a variable to record the amount of vowels there are in the string.

3 -  convert the input string into a character array and iterate through each character

4 - for each of the character of the string we go through, check if it matches any of the vowels

5 - return true if the vowel count is greater than 1

Alternative methods using the Java Stream API have also been wrote, please respond if you require them.

7 0
3 years ago
Other questions:
  • Write a short reflection piece (it may consist of three bulleted items, with one explanatory sentence) on three things you learn
    9·1 answer
  • What is a block cipher algorithm that operates on 64-bit blocks and can have a key length from 32 to 448 bits?
    8·1 answer
  • HELP! Answer to question 2?
    12·1 answer
  • Program Rock.java contains a skeleton for the game Rock, Paper, Scissors. Open it and save it to your directory. Add statements
    10·1 answer
  • Write a C program to implement a command called ​displaycontent ​that takes a (text) file name as argument and display its conte
    9·1 answer
  • When storing used oil, it needs to be kept in ___________ containers.
    12·1 answer
  • How to change color of object in photoshop?
    10·2 answers
  • /*this function represents
    8·2 answers
  • Write a method for the Invitation class that accepts a parameter and uses it to update the address for the event.
    9·1 answer
  • Select the correct answer. Marie uses a browser to visit a blog. How is the blog uniquely identified? A. web page B. website C.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!