Write a program that accepts two real numbers

Assignment Help C/C++ Programming
Reference no: EM13681778

Write a program that accepts two real numbers from a user and a select code. If the entered select code is 1, have the program add the two previously entered numbers and display the result; if the select code is 2, the numbers should be multiplied, and if the select code is 3, the first number should be divided by the second number.

Division by 0 should not be allowed and an appropriate message should be displayed when such a division is attempted. The program should allow the user to use the program over again.

Reference no: EM13681778

Questions Cloud

What is the value of the electric field among the plates : A man of 50.0 kg mass is in equilibrium among two parallel plates. The man is charged up to + 130. mC of charge. The plates are 1.75 meters apart. What is the value of the electric field among the plates? What is the potential difference among the pl..
Analyse the international trade strategies : Analyse the international trade strategies of Boeing and Airbus by developing the following to be included in your Final Project paper.
Compute the potential difference across each capacitor : A 0.50-F and a 1.4-F capacitor (C1 and C2, respectively) are connected in series to a 16-Vbattery. Calculate the charge on each capacitor. Compute the potential difference across each capacitor. Compute the charge on each capacitor assuming the two c..
Kinetic energy of the first block before the collision : A 3.5kg block moving at 2.0 m/s toward the west on a frictionless surface has an elastic head-on collision with a second 1.1kg block traveling east at 3.0 m/s. Decide the kinetic energy of the first block after the collision. Decide the kinetic energ..
Write a program that accepts two real numbers : Write a program that accepts two real numbers from a user and a select code. If the entered select code is 1, have the program add the two previously entered numbers and display the result
Length of the spring when the charges are in equilibrium : Two spherical point charges each carrying a charge of 40 mC is attached to the two ends of a spring of length 20 cm. If its spring constant is 120 Nm-1, what is the length of the spring when the charges are in equilibrium?
How much energy is required to place four positive charges : How much energy is required to place four positive charges, each of magnitude +5.0 mc, at the vertices of a square of side 2.5 cm? Choose one way of assembling the charges and com1pute the potential at each empty vertex as this set of charges is asse..
What is the individual capacitance of each capacitor : Two capacitors connected in parallel produce an equivalent capacitance of 45.0F however when connected in series the equivalent capacitance is only 4.2F. What is the individual capacitance of each capacitor?
What will the speed of the car be if there is no friction : A 1210 kg car is driving on 60 km/h on an inclined plane. The car is located on the top of the plane. The plane is 655 m long and the angle is 4.50 degrees. What will the speed of the car be if there is no friction?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Lab9 c if you can start with attachments file first get

if you can start with attachments file first get that part then start with the lab 9 ltbrgtcmpet301lab9

  Write a c++ program to grade multiple-choice

Write a C++ program to grade multiple-choice, including True/False, questions for an exam given in a class. A class may have one or more sections.

  Write an application that reads the user''s weight

Write an application (BMICalc) that reads the user's weight in poinds and height in inches, then calculates the Body Mass Index.

  Write a program that inputs two characters

Write a program that inputs two characters from the keyboard and passes them to function packCharacters.

  Objectivein this assignment you read a list of employees

objectivein this assignment you read a list of employees from a csv file and convert them into corresponding objects.

  Creates a macro to calculate the area

Build a program that creates a macro to calculate the area of a circle using the formula area = pie x radius x radius. In the same program, prompt the user to enter a circle's radius. Use the macro to calculate the circle's area and display the re..

  Pros and cons of choosing two servers

Classify the two alternatives in terms of what type of application architecture they use. b. Outline the pros and cons of the two alternatives and make a recommendation to Fred about which is better.

  Write a program that skip s leading whitespace character

a) Write a program that skip s leading whitespace character s in each line of the pro vided data file CPPHumor .txt . Save the results in a new file

  Program to tell you how many months it will take to pay off

write a program to tell you how many months it will take to pay off any loan, as well as the total amount of interest paid over the life of the loan.

  Write a recursive and iterative versions of binary search

in C++ write a recursive and iterative versions of binary search and compare their run times using the array a[i]=i, i=0,..., n-1

  While loop that allows the user to continue entering

This code should include a while loop that allows the user to continue entering employees as long as they want to continue:int main(){Real payrate,hours, gross,again;

  Write program which inputs number of winning coupons

Write a program which inputs number of coupons you win and outputs how many candy bars and gumballs you can get if you spend all off your coupons on candy bars first and remaining coupons on gumballs in c++.

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