create a program that will simulate a calculator that does the four basic mathematical operations (addition, subtraction, multiplication, and division) ask the user to submit two numbers and assign those numbers to two different variables the variables will be integers and be named number1, and number 2 display the four operations available then, ask the user which operation they want to do use a decision structure (switch or if/else) compute the answer, using the correct formula display the answer in a sentence save your file as calculator.cpp run your program four times, so you can all four operations for accuracy (what happened when you did division? integer division usually gives an incorrect answer.). to solve division issue, you have two choices: change variable type for number1 and number2 to double use typecasting just for division (pg 103 - 106 in book explains how) submit your .cpp file here due by sunday night

Answers

Answer 1

To handle division, the programme first verifies that the second value is not zero to prevent division by zero errors. Run the programme more than once and check the precision of each of the four operations.

#include iostream> using the std namespace; char procedure; int main(); int number1, number2, result;

cout << " "Input the first number:" is followed by the commands "Cin >> number1" and "Enter the second number:" "number2; cin;

Select a mathematical operation from (+, -, *, or /): cout; cin >> operation;

switch(operation) "case "+": result = number1 + number2; cout " " The sum reads as follows: "result endl; break; case '-': result = number1 - number2; cout " The distinction is: " result endl; break; case '*': result = number1 * number2; cout " The thing is: "the following: result endl; break; case '/': if(number2!= 0) "Result: Number1 divided by Number2; cout" " The quotient is as follows: result endl; else cout "Error: Division by zero!" endl; break; default: cout "Invalid operation!" en "l; \s } returning 0; This application asks the user to enter two numbers before asking them to select an operation (+, -, *, or /). The programme executes the appropriate computation and displays the outcome depending on the selected operation. To handle division, the programme first verifies that the second value is not zero to prevent division by zero errors. Run the programme more than once and check the precision of each of the four operations.

Learn more the programme about  here:

https://brainly.com/question/30164642

#SPJ4


Related Questions

What is the process of identifying rare or unexpected items or events in a data set that do not conform to other items in the data set

Answers

Anomaly detection is the process of identifying rare or unexpected items or events in a data set that do not conform to other items in the data set.

What is Data?

This is referred to as a raw form of information and comprises of facts, numbers, etc.

Anomaly detection identifies abnormal data from a given set which is why it is the most appropriate choice.

Read more about Data here https://brainly.com/question/4219149

#SPJ1

Carlos, an algebra teacher, is creating a series of PowerPoint presentations to use during class lectures. After writing, formatting, and stylizing the first presentation, he would like to begin writing the next presentation. He plans to insert all-new content, but he wants to have the same formatting and style as in the first one. What would be the most efficient way for Carlos to begin creating the new presentation?

Answers

Answer:

see explanation

Explanation:

Carlos can make a copy of the old presentation that preserves all the formatting, and replace old content with new information.

Answer:

going under the Design tab and opening the template that was created for the first presentation

Explanation:

What method can provide qualitative data about customers' experiences to help an organization improve?

Answers

The most common ways to collect qualitative data are through: Interviews, Observations. Surveys & Questionnaires.

but maybe also Focus groups or  Case studies

Read the following code:

# Calculate average
average = numl + num2 + num3 / 3.0

There is an error in the code. How should the code be revised in order to get the correct output?

A:average = numl + num2 + num3 - 3.0

B:average = numl + num2 + num3 - 3.0

C: average = (numl + num2 + num3) / 3.0

D: average = numl + num2 + num3 / (3.0)

Answers

C is the correct answer

Why authentication processes and features important

Answers

Answer:

Authentication processes are extremely important because they are an extra layer of security. These processes can help keep networks secure by only permitting authorised users to access them. Authentication processes can be used on things such as networks, databases, websites and other network based services/platforms.

Explanation:

the process of searching through many records in one or more databases looking for patterns or relationships is called

Answers

Data mining is the process of sorting through large data sets to uncover patterns and relationships that can be used in data analysis to help solve business problems.

What steps are involved in finding patterns in data?

Data mining is the act of sorting through vast amounts of data for correlations, patterns, and trends. Sometimes, the phrases "data mining" and "knowledge discovery" are used interchangeably. It is a branch of data science that integrates mathematical and statistical methods with machine learning and database systems.

What steps are involved in finding patterns in a collection of data and then using those patterns to draw a conclusion?

The method of observing data, spotting patterns, and drawing conclusions about those patterns is known as inductive reasoning. Throughout this course, inductive reasoning will be used.

To know more about data mining visit:-

https://brainly.com/question/14080456

#SPJ1

How much would it cost to get the screen replaced on a Moto G7?

Answers

If you know enough about tech you can buy a replacement screen online for like $40.00 and do it yourself or might be around like $100 to get it fixed, depends on the place you go too.

SRFRAME RKMATE - people from nearby provinces come to buy livestock direct from raisers themselves.

Answers

Answer:

Farmers market.

Explanation:

Farmers market is a type of market (marketplace) where people from nearby provinces come to buy livestock direct from raisers themselves.

This ultimately implies that, the consumers go to farmers market to buy farm produce such as vegetables, fruits and livestock directly from the farmers.

Additionally, farmers market is devoid of middlemen such as wholesalers or retailers in the transactional process.

Thanks for asking me to ask a ques !!

Answers

Answer:

I'm not sure what this means by Hope you have a great day :)

Answer:

An important role to follow when learning is to ask questions.

How long you plan to keep your investments in your portfolio refers to:
A. Time horizon
B. Asset allocation
C. Personal financial health
D. Risk tolerance

Answers

Answer:

A, because it has to do with the amount of time you have it in your portfolio.

how to paste text without changing the style

Answers

Explanation:

left click on the text and move the mouse icon

name 10 songs of POP SMOKE

Answers

Answer:

   "Welcome to the Party" Pop Smoke.

   "Christopher Walking" Pop Smoke.

   "Dior" Pop Smoke.

   "What You Know Bout Love" Pop Smoke.

   "The Woo" Pop Smoke Featuring Roddy Ricch and 50 Cent.

   "MPR" Pop Smoke.

   "Diana (Remix)" Pop Smoke Featuring Calboy and King Combs.

   "For The Night"

Dior. Dior. ...

Mood Swings (feat. Lil Tjay) ..

Explanation:

:)

how does a router use frames to route data through a network?

Answers

The router checks the MAC address in the frame, replaces the MAC address of the source with its own MAC address, and sends it to the proper host.

We have to give that,

To find the way to a router use frames to route data through a network.

Now, We know that,

A router uses frames to route data through a network in the following way:

The router receives an incoming frame containing data from a source device.

The router examines the destination MAC address in the frame header to determine the intended recipient of the data.

If the destination MAC address is known to the router, the router forwards the frame directly to the recipient.

If the destination MAC address is not known to the router, the router uses a process called Address Resolution Protocol (ARP) to find the MAC address of the intended recipient.

Once the router has determined the MAC address of the recipient, it forwards the frame to the appropriate interface that leads toward the recipient.

If there are multiple possible paths to the recipient, the router uses a routing algorithm to determine the best path based on factors such as network congestion, bandwidth, and other factors.

Finally, the router encapsulates the data into a new frame with a new MAC address that corresponds to the next hop on the path to the recipient and forwards the frame to the next router or the final recipient.

This process is repeated at each router along the way until the data reaches its final destination.

To learn more about routers visit:

https://brainly.com/question/28180161

#SPJ4

Select the correct answer.
What is a hyperlink?
A.
A bold link that goes back to a newspaper
B.
A link that clicks on itself
C.
A way to cite sources in an online article
D.
A special link on a smartphone

Answers

Answer:

c.

Explanation:

a link from a hypertext file or document to another location or file, typically activated by clicking on a highlighted word or image on the screen.

Answer:

c

Explanation:

came out my study guide and i made a 96 % on my 50 question test

what are some possible questions that you think would be helpful for an entrepreneur to ask people who are interacting with their prototype?

Answers

Answer:

What challenges did you encounter while using the prototype, which may have made it difficult to use?

Would you recommend the prototype to others? Why or why not?
What do you think could be improved in the prototype?

Explanation:

These questions are open-ended and allow for the audience at hand to give their personal thoughts and opinions, rather than confining them to yes or no questions that provide little constructive feedback.

If Col1 contains the string "Hello" and Col2 is Null, what is the result of SELECT Col1 + Col2?
Select one:
a. Null
b. "Hello"
c. "HelloNull"
d. Error

Answers

The result of SELECT Col1 + Col2, where Col1 contains the string "Hello" and Col2 is Null, would be Null.

In SQL, when you concatenate a string with a Null value using the '+' operator, the result is always Null. Therefore, the concatenation of "Hello" with a Null value would yield Null. Null represents the absence of a value or an unknown value, and any operation involving Null typically results in Null.

Hence, the correct answer is a. Null.

Know more about SQL here:

https://brainly.com/question/31663284

#SPJ11

HELP PLS!!! In a presentation, what is layout?

Answers

a plan about how to do it
Slide layouts contain formatting, positioning, and placeholder boxes for all of the content that appears on a slide
HELP PLS!!! In a presentation, what is layout?

excel functions are prebuilt formulas within excel.

Answers

Formulas are mathematical equations that integrate cell references, excel  values, and operators to compute results. It is not necessary to write the underlying formula when using functions because they are prebuilt formulas that can be rapidly fed values.

What do Excel's functions and formulas mean?

Functions are pre-written formulas that perform calculations using specific variables, also known as inputs, in a predetermined order or structure. Functions can be used to do calculations of any complexity. The Formulas tab on the Ribbon contains the syntax for all of Excel's functions.

What is the name of the pre-written formulas in Excel?

An already written formula is a function. A function performs an operation on a value (or values), then returns a new value (or values.)

To know more about excel  visit:-

https://brainly.com/question/3441128

#SPJ4

how to tell if your cell phone is being tracked tapped or monitored by spy software?

Answers

if you are on IOS Go to settings- privacy- calendar

Other devices then i would recommend downloading a spyware app that will monitor your device

Identify the order of steps in the structure of a program. Other steps may be left out.
Step 1:
Step 2:
Step 3:
Input, output, process.

Answers

Input, process, output

A small manufacturing business wants to hire a landscaping service to
maintain its lawn. The purchasing department has narrowed its choices to
Tom's Green Thumb and M&C Minions. Jillian wants to research customer
reviews before writing a recommendation. Which online search method
would be most helpful?
O
A. Use an online catalog to search for "choosing a landscaper."
) B. Use the company's database to find records of past landscaping
choices.
C. Use a search engine to search for "Tom's Green Thumb reviews"
and "M&C Minions reviews."
D. Use a search engine to search for "top 10 landscapers" or "best
landscaping tips.

Answers

Answer:

C. Use a search engine to search for "Tom's Green Thumb reviews"

and "M&C Minions reviews."

Explanation:

Reviews from a search engine are the best recommendation.

How do I delete my brainly account?

Answers

Go to profile in the bottom right then go to profile again and it should be there

Go to profile(edit profile). Then, click preferences. On the bottom, it will say, I want to delete my account.

How many ways can a delegation of 4 Republicans, 4 Democrats, and 2 independents be selected from a group of 10 Republicans, 6 Democrats, and 4 Independents? Answer How to enter your answer fopens in new window) 2 Points Keypad Keyboard Shortcuts

Answers

There are 31,500 ways to select a delegation of 4 Republicans, 4 Democrats, and 2 Independents from the given group.

To determine the number of ways a delegation can be selected, we need to calculate the combination of Republicans, Democrats, and Independents.

The number of ways to select the Republicans is given by the combination formula:

C(10, 4) = 10! / (4!(10-4)!) = 210 ways

The number of ways to select the Democrats is given by the combination formula:

C(6, 4) = 6! / (4!(6-4)!) = 15 ways

The number of ways to select the Independents is given by the combination formula:

C(4, 2) = 4! / (2!(4-2)!) = 6 ways

To determine the total number of ways to select the delegation, we multiply these three values together:

Total number of ways = 210 * 15 * 6 = 31,500 ways

Therefore, there are 31,500 ways to select a delegation of 4 Republicans, 4 Democrats, and 2 Independents from the given group.

The question should be:

How many ways can a delegation of 4 Republicans, 4 Democrats, and 2 independents be selected from a group of 10 Republicans, 6 Democrats, and 4 Independents?

To learn more about delegation: https://brainly.com/question/10708236

#SPJ11

a(n) _______ is a group of formatting options that you apply to a presentation.

Answers

A(n) "theme" is a group of formatting options that you apply to a presentation.

Themes typically include a combination of colors, fonts, background styles, and other formatting options that provide a consistent and professional look and feel to a presentation. By selecting a theme, users can apply a unified design to all slides in the presentation, which can save time and ensure a cohesive look and feel. Users can also customize and create their own themes to suit their specific needs and preferences.

Learn more about  theme here;

https://brainly.com/question/29555710

#SPJ11

What are some of the unique benefits and challenges of flash drives as a way to store data?

Answers

Answer:

these are some benefits Increased Durability. Unlike traditional hard-disk drives, flash drives lack moving parts

Maximum Portability

Plenty of Storage Capacity

Fast Transfer Speeds

Compatibility with Many Devices

Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase. Ex: If the input is: n Monday the output is: 1 Ex: If the input is: z Today is Monday the output is: 0 Ex: If the input is: n It's a sunny day the output is: 2

Answers

Answer:

import java.io.*;  

public class Main {

   public static void main(String[] args) throws IOException {

       BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

       String s;

       while ((s = in.readLine()) != null) {

           int total = 0;

           for (char character : s.toCharArray()) {

               if (s.charAt(0) == character) {

                   total++;

               }

           }

           System.out.println(total - 1);

       }

   }

}

Explanation:

We start the program by using the BufferedReader which will allow input from the user.

Then, we create a variable String that will take the input from the user.

Since the problem is asking us for the total number of times that the specified character appeared in the String, we will have to iterate over that String and count every time the character is found.

For this, I initialized an integer variable total, that takes count every time the character is found.

Using a for each loop, I converted the string to a character array (e.g. instead of a String "Monday", it will now look like {"M", "o", "n", "d", "a", "y"). It will iterate for each character it finds and checks if the character at position 0 is the same as the character at position i.

If the condition is true, then the total will increment by one.

But the problem is, since we converted the string into a character array to validate each character, the initial character will also add to the sum. So for "n Monday", it will take the first n, and add the total + 1.

Without specifying total - 1, "n Monday" will output 2 since there are two total "n".

There is a limitation, which wasn't specified in the problem statement anyway, but it's good to be aware of in case you need to solve it. If you want to check all of the characters that must equal the character you want to validate, irrespective of upper or lowercase, you will have to convert the string to lowercase first, so that the program will take the uppercase letters into account as well.

For that, before the for each statement, simply add s = s.toLowerCase();

PLS HURRY!!

dwayne wants a variable called
"name" to appear in the output box and does not want a space after it. which of these should be used to make that happen ?

A. name,

b. name)

c. name+

D. name.​

Answers

Answer:

D. name

Explanation:

because he doesn't want space after so it has to be a full stop

To make the variable name appear in the output box without a space after it, option D. name. should be used.

Suppose you have the following numbers and need them to be written in the two other numbering
systems. Before you could translate them, you would need to identify what numbering system is currently
used. Which numbering systems do the following numbers represent? (4 points)
a) 2C
b) 109

Answers

Answer:

Explanation:

a) hexadecimal

because hexadecimal numbers use 0-9 and letters A-F

b) decimal

109 is just a regular number and the standard numbering system that humans use is decimal

Can someone please explain this issue to me..?

I signed into brainly today to start asking and answering questions, but it's not loading new questions. It's loading question from 2 weeks ago all the way back to questions from 2018.. I tried logging out and back in but that still didn't work. And when I reload it's the exact same questions. Can someone help me please??

Answers

Answer:

try going to your settings and clear the data of the app,that might help but it if it doesn't, try deleting it and then download it again

I haven’t been able to ask any questions in a few days, maybe there’s something wrong with the app

Which of the following ethical guidelines is best described as refraining from using granted authorizations for personal gain or activities that are not appropriate in the workplace?

Do not use computer access or the Internet for unprofessional or inappropriate purposes.

Protect system access of users.

Do no harm to a company when leaving.

Be fair and honest with customers.

Answers

Answer:

"Which of the following ethical guidelines is best described as preventing Social Security numbers, bank account numbers, addresses, and phone numbers from getting in the wrong person’s hands?"

A: Respect confidentiality of data

Explanation:

correct on Edg

Answer:

Respect confidentiality of data.

And

Do not use computer access or the Internet for unprofessional or inappropriate purposes.

Explanation:

Other Questions
5. a customer has requested that endurance corporation fill a special order for 2,000 units for $35.00 a unit. while the product would be modified slightly for the special order, the normal unit product cost is $21: direct materials: $6 direct labor: $4 variable manufacturing overhead: $3 fixed manufacturing overhead: $8 direct labor is a variable cost. the special order would have no effect on the company's total fixed manufacturing overhead costs. the customer would like modifications made to the product that would increase the variable costs by $1.20 per unit and that would require an investment of $15,000 in special printers that would have no salvage value. the company has maximum capacity of producing 30,000 units per year and there is a current demand for all 30,000 units. the company currently sells 30,000 units per year for $31.00 per unit. if the special order is accepted, the company's overall net operating income would increase (decrease) by: a. $(46,000) b. $(9,400) c. $0 d $26.600 Give specific examples that illustrate the following processes. a. Work is done on a system, thereby increasing kinetic energy with no change in potential energy. b. Potential energy is changed to kinetic energy with no work done on the system. c. Work is done on a system, increasing potential energy with no change in kinetic energy. d. Kinetic energy is reduced, but potential energy is unchanged. Work is done by the system. Find the radius of convergence and interval of convergence of the power series (x - 5)" n n=1 T. Y Solve the inequality d/4 > 36 for dA. d < 9B. d < 144C. d > 144D. d > 9 Which line from the poem emphasizes the idea of losing oneself in nature?1)A)All beautiful and splendid things,B)Life has loveliness to sell,C)Eyes that love you, arms that hold,D)Give all you have been, or could be. as a new employee in the lottery commission, your first job is to design a new game and prize. your idea is to create two grand prize choices. the first prize is the amount of $360 in 5 years. the second prize is to receive the amount of $160 immediately followed by some unknown annuity that is paid at the end of each year for 5 years with the first annuity payment received at the end of year 1. using an interest rate of 6.50%, determine the unknown annuity amount for the second prize that would make the present value of both prizes equivalent. The three call options issued by Square Inc are listed below. Suppose that the current price of Square is $247.89. Today is May 17, 2022. Option Option price Strike price Expiration date A $2.73 $260.00 May 30, 2022 B $15.60 $240.00 June 1, 2022 C $30.20 $220.00 Junly 25, 2022 Because Option C has a longer time before expiration than Options A and B, it has the highest time value. Is it correct? Explain These chapters demonstrate both kindness and hatred towards others. What can we do to ensure kindness overpowers hatred? REFUGEE NOVEL What are the best foods for cancer patients with nausea? Calculate the cash surrender value for Lee Chin, age 39, who purchased a $280,000 20-year endowment policy. At the end of year 10, Lee stopped paying premiums. (Use Table 20.2.)Note: The answer is NOT 140,000 Can someone help me with this 250 pg dust particle has charge -250e. Its speed is 2.0 m/s at point 1, where the electric potential is V1 = 1200 V. What speed will it have at point 2, where the potential is V2 = -6500 V? Ignore air resistance and gravity. Express your answer with the appropriate units. ol ? m V2 = Value Researchers want to determine whether drivers are significantly more distracted while driving when using a cell phone than when talking to a passenger in the car. In a study involving 48 people, 24 people were randomly assigned to drive in a driving simulator while using a cell phone. The remaining 24 were assigned to drive in the driving simulator while talking to a passenger in the simulator. Part of the driving simulation for both groups involved asking drivers to exit the freeway at a particular exit. In the study, 7 of the 24 cell phone users missed the exit, while 2 of the 24 talking to a passenger missed the exit. (a) Would this study be classified as an experiment or an observational study? Provide an explanation to support your answer. (b) State the null and alternative hypotheses of interest to the researchers. H0: Ha: (c) One test of significance that you might consider using to answer the researchers question is a two-proportion z-test. State the conditions required for this test to be appropriate. Then comment on whether each condition is met. (d) Using an advanced statistical method for small samples to test the hypotheses in part (b), the researchers report a pvalue of 0.0683. Interpret, in everyday language, what this pvalue measures in the context of this study and state what conclusion should be made based on this pvalue. China is in an early state of development, with a per capita income that is still less than one-fifth of the per capita income in the United States. A) $5,000 B) $10,000 C) $25,000 D) $50,000 Imagine that there is an urn containing 5 blue chips and 5 red chips where chips are of equal dimensions and all chips in the urn at a time are equally likely to be selected. LetXdenote the total number of blue chips obtained when 3 consecutive chips are drawn from the urn without replacement. (a) (10 points) Compute the probability thatX=3 Identify the preferred site(s) of electrophilic attack on the following compound. ortho/para positions on ring 1 meta position on ring 1 ortho/para positions on ring 2 meta position on ring 2 Which statement below correctly describes their relative atomic radii and first ionization energy when comparing Se and Br? The atomic radius for Se is larger than Br, and the first ionization energy for Se is greater than Br. The atomic radius for Br is larger than Se, and the first ionization energy for Bris greater than Se. The atomic radius for Se is larger than Br, and the first ionization energy for Br is greater than Se. The atomic radius for Br is larger than Se, and the first ionization energy for Se is greater than Br. Some consumers, like lions, do not eat plants or any other producers. They only eat other animals.How do lions obtain the carbon they need?by eating animals that have carbon-based molecules stored in their bodiesby breathing it in from the atmosphere in the form of carbon dioxideby absorbing carbon-based molecules through their skin from the soilby drinking water that contains carbon dioxide