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

  Goto statements to explicitly

Rewrite the following program fragment using goto statements to explicitly show the flow control through the loop.

  Write a program that convert fahrenheit to degrees celsius

Write a program that will convert Degrees Fahrenheit to Degrees Celsius.

  Submap that accepts two maps from strings

Write a method called subMap that accepts two maps from strings to strings as its parameters and returns true if every key in the first map is also contained in the second map and maps to the same

  The process function will then need

The process function will then need to find the time the person waited by calling the time function and finding the difference between the start and end timestamps. Save this time to an accumulator so that in the end you can find the average wait tim..

  Write a program to simulate tossing a fair coin

Print the number of tosses that yield heads and the number of tosses that yield tails. What should be the percentage distribution of heads and tails?

  Up through 2 to the 10th power

program should compute and output all of the "powers of two" from 2 to the 0th power, up through 2 to the 10th power.

  A text file students.txt contains student records

A text file students.txt contains student records (name, date of birth, and GPA). Write a program that reads student records from students.txt and creates an array of student structures

  The funtion should take as parameters

Write a function in c ++ that multiplies two functions. the funtion should take as parameters two fraction structures. Then, the function should multiply the two fractions and return the solution as a fraction structure.

  Sockets for this problem you will implement a client-server

sockets for this problem you will implement a client-server version of the rock-paper-scissors-lizard-spock game which

  C program to mips program

Convert the following C program to MIPS program. Assuming that i, j, k, f, are stored in registers $s0, $s1, $s2, $s3 already. The base address of arrays A and B are in registers $s4 and $s5, respectively. (30

  Write a program to implement a menu driven application

Write a C or C++ program to implement a menu driven application which will maintain a list of car models, their price, name of the manufacturer, engine capacity etc., as a doubly linked list

  To deal with deadlocks we can either use prevention or

to deal with deadlocks we can either use prevention or avoidance or detection followed by recovery. but which is a

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