Question

In: Computer Science

IN C++ PLEASE!!! Design and implement a programming (name it SimpleMath) that reads two floating-point numbers...

IN C++ PLEASE!!! Design and implement a programming (name it SimpleMath) that reads two floating-point numbers (say R and T) and prints out their values, sum, difference, and product on separate lines with proper labels.

Solutions

Expert Solution

hello,

let me provide the code for your problem.(i will also provide the snapshot of output).

code starts here:-

#include<iostream>
using namespace std;
int main()
{
    float r,t;
    cout<<"enter first floating value: ";
    cin>>r;
    cout<<"enter second floating number: ";
    cin>>t;
    cout<<"the first value is "<<r<<" and second value is "<<t<<endl;
    cout<<r<<" + "<<t<<" = "<<r+t<<endl;
    cout<<r<<" - "<<t<<" = "<<r-t<<endl;
    cout<<r<<" * "<<t<<" = "<<r*t<<endl;

    return 0;
}   

code ends here

this is a simple code, we have declared two variable of type float, and prompted the user to provide two floating values.

when user provided these value , we show them four statements, showing the values, there sum , there difference and ther product.

the snapshot of output is follow:-

i hope i was able to solve your problem to a greater extent, feel free to raise your queries in comments section. I will surely respond to them.Please consider my efforts and upvote my solution.

Thanku:)


Related Solutions

In c++   Design and implement a programming (name it SimpleMath) that reads two floating-point numbers (say...
In c++   Design and implement a programming (name it SimpleMath) that reads two floating-point numbers (say R and T) and prints out their values, sum, difference, and product on separate lines with proper labels. Comment your code properly and format the outputs following these sample runs.
PLEASE DO THIS IN C#Design and implement a programming (name it NextMeeting) to determine the day...
PLEASE DO THIS IN C#Design and implement a programming (name it NextMeeting) to determine the day of your next meeting from today. The program reads from the user an integer value representing today’s day (assume 0 for Sunday, 1 for Monday, 2 for Tuesday, 3 for Wednesday, etc…) and another integer value representing the number of days to the meeting day. The program determines and prints out the meeting day. Format the outputs following the sample runs below. Sample run...
USING C# Design and implement a program (name it SumValue) that reads three integers (say X,...
USING C# Design and implement a program (name it SumValue) that reads three integers (say X, Y, and Z) and prints out their values on separate lines with proper labels, followed by their average with proper label. Comment your code properly.Format the outputs following the sample runs below. Sample run 1: X = 7 Y = 8 Z = 10 Average = 8.333333333333334
IN C++ PLEASE!!! Design and implement a program (name it Coins) that determines the values of...
IN C++ PLEASE!!! Design and implement a program (name it Coins) that determines the values of coins in a jar. The program prints out the total dollars and cents in the jar. The program prompts the user to enter the number of coins (quarters, dimes, nickels, and pennies). Print out the number of coins entered for each coin type on separate lines followed by the total amount of money in the jar as dollars and cents as shown below.
IN C++ LANGUAGE PLEASE::: Design and implement a program (name it Rectangle) to calculate and display...
IN C++ LANGUAGE PLEASE::: Design and implement a program (name it Rectangle) to calculate and display the area and perimeter of a rectangle with width = 4 and height = 8.
this is a python code: QUESTION 1: Input floating point numbers for a, b, c, d...
this is a python code: QUESTION 1: Input floating point numbers for a, b, c, d and e. calculate the following and display the result.  Mathematical expression ab means a * b in programming context. QUESTION 2: You are sleep expert for a baby that is having struggle sleeping every night. You are to ask the mother of the child "How many oz of milk the child drank ?" Based on the amount of milk, you will have to determine...
Implement a queue - C programming, please read the instruction carefully and implement queue.c using dynamic...
Implement a queue - C programming, please read the instruction carefully and implement queue.c using dynamic array structure given dynarray.h and dynarray.c below The second ADT you'll implement for this assignment is a queue. For this assignment, the interface for the queue (i.e. the structures and the prototypes of functions a user of the queue interacts with) is already defined for you in the file queue.h. Your first task in this assignment is to implement definitions for the functions that...
Using the simple model for representing binary floating point numbers A floating-point number is 14 bits...
Using the simple model for representing binary floating point numbers A floating-point number is 14 bits in length. The exponent field is 5 bits. The significand field is 8 bits. The bias is 15 Represent -32.5010 in the simple model.
verilog code to implement 32 bit Floating Point Adder in Verilog using IEEE 754 floating point...
verilog code to implement 32 bit Floating Point Adder in Verilog using IEEE 754 floating point representation.
DO THIS IN C#. Design and implement a program (name it MinMaxAvg) that defines three methods...
DO THIS IN C#. Design and implement a program (name it MinMaxAvg) that defines three methods as follows: Method max (int x, int y, int z) returns the maximum value of three integer values. Method min (int X, int y, int z) returns the minimum value of three integer values. Method average (int x, int y, int z) returns the average of three integer values. In the main method, test all three methods with different input value read from the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT