1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
VashaNatasha [74]
3 years ago
6

Write a program that asks the user to enter two numbers,obtains the two numbers from the user and prints the sum,product,

Computers and Technology
1 answer:
Andru [333]3 years ago
4 0

Answer:

#include<iostream>

using namespace std;

//main function

int main(){

   //initialization

   float a1,a2;

//display the message

cout<<"Enter the first number: ";

   cin>>a1;  //store the value

   cout<<"Enter the second number: ";

   cin>>a2;   //store the value

   //display the calculation result

   cout<<"The sum is: "<<a1+a2<<endl;

   cout<<"The Subtraction is: "<<a1-a2<<endl;

   cout<<"The product is: "<<a1*a2<<endl;

   cout<<"The Quotient is: "<<a1/a2<<endl;

}

Explanation:

Create the main function and declare the two variables of float but we can enter the integer as well.

display the message on the screen and then store the input enter by the user into the variable using the cin instruction.

the same process for second input as well, display the message and store the input.

after that, print the output of the calculation. the operator '+' is used to add the two numbers like a1+a2, it adds the number stored in the variable.

similarly, the subtraction operator is '-', product '*' and quotient operator '/'.

and finally, we get the desired output.

You might be interested in
In a networked environment, each computer on the network can access the hardware on the network. True of False?
kakasveta [241]
Access independ on your network it secure or not if not secure you can access to any hardware on the network
7 0
4 years ago
If you enter 234.567 into a cell that is formatted to display 1 decimal point place, what is the value stored in the cell
zalisa [80]

IT WILL NOT BE 234.6 FOR PF GANG JUST TOOK THE TEST

6 0
3 years ago
The limitations placed on employees in accordance with the company's policies and procedures
Anna71 [15]

Answer:

Answer is B!

Explanation:

I just took the quiz (:

5 0
4 years ago
When you purchase an item in a store, you may be charged __________.
Ilya [14]
A sales tax? what are the options?
8 0
3 years ago
Read 2 more answers
What are two techniques used to indent a paragraph?
Wewaii [24]
You could hit tab or you could hit the space bar
4 0
4 years ago
Read 2 more answers
Other questions:
  • The domain is the part of an internet address that refers to a group of computers on a network. true or false.
    15·1 answer
  • Joaquin is considering a career as an animator and wants to know more about the daily work of an average animator. Which strateg
    11·1 answer
  • List several things that geographers can map using remotely sensed data
    5·1 answer
  • What is the most effective way to demonstrate being prepared for an interview?
    8·2 answers
  • Do the police check your mobile device during police checks?
    10·2 answers
  • What lists the parts of the report and the pages they are on?
    12·1 answer
  • If multiple people require the use of proprietary software at the same time, what type of license is needed?
    7·1 answer
  • In Windows, which menu allows you to view file characteristics?
    14·1 answer
  • Need the answer for this code hs will give brainly
    7·1 answer
  • What is the value of the variable named result after the following code executes?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!