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

  Write a method, to be included in a template unsorted list

Write a metho, to be included in a template unsorted list class, called replace_item, that will receive two xType parameters, one called olditem, the other called newitem.

  Unlike c other programming languages have associative

unlike c other programming languages have associative arrays that allow array indices to be strings instead of just

  Create a 1-dimensional (1d) array

Write a program to create a 1-dimensional (1D) array that contains 15 characters and display to the screen a count of the occurrences of each of the vowels a, e, i, o, and u in the array.

  Objective1 to give students practice in calling and writing

objective1. to give students practice in calling and writing their own functions.2. to give students practice in

  Calculates different formulas that converge to the number pi

Write a C program (Care should be taken not to use extensions of C + + language in your work ) that calculates different formulas that converge to the number  pi,  to compare the speed of convergence of these formulas. Each form will be calculated by..

  Write c program that forks two child processes

Write a C program that forks two child processes. The parent process will print all prime numbers up to 229, the first child process will print the first 50 Fibonacci numbers.

  Describe the probability of the moves

Write a program in C++ to describe the Probability of the moves

  Create a class to hold credit card information

The information to store is the card type (Visa, Mastercard, etc.) card number, the limit, and the current balance.

  Develop classes describing various types of buildings

Describe how inheritance might be used to develop classes describing various types of buildings.

  Use numbers 0 through 23 to represent hours

Write a C function seconds_since_jan1() that takes the time as six integer arguments (year, month, day, hour,minute, and second) and returns the number of seconds since the beginning of the year. Use numbers 1 through 12 to represent months. Use numb..

  Write a c program that reads in five numbers

Q1. (Bar Chart /Histogram printing) Write a C program that reads in five numbers (each between 1 and 30). For each number read, your program should print a line containing that number of adjacent asterisks. For example, if your program reads the numb..

  A program computes and displays the number of centimeter

The Earth's ocean levels have risen an average of 1.8 millimeters per year over the past century. Write a program computes and displays the number of centimeters and number of inches the oceans rose during this time.

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