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
The rhythmic note that three beats is called a____half note.
aev [14]

Answer:

it is called a dotted half note

7 0
3 years ago
Read 2 more answers
________ is used to enter the results of a CBC into the computer system.pharmacy system.laboratory system.order entry/results re
podryga [215]

Answer:

laboratory system.

Explanation:

4 0
2 years ago
Best free vpn to bypass geo tagging
Mamont248 [21]

Answer:

Nord VPN

Explanation:

5 0
4 years ago
How do you turn on the Track Changes feature in a spreadsheet?
myrzilka [38]
I would "turn on" this track changer as I would usually go to the top left corner, where it would say edit, and then, usually, as you look down at the bottom, you would then see where it would then be a switch that would say "turn on" or "turn off" track changer.
4 0
4 years ago
Unlike the _____ presentations of the other students in class, Calum's presentation demonstrated a thorough and mature grasp of
finlep [7]

Answer:

immature

Explanation:

3 0
4 years ago
Other questions:
  • What are like arms surrounding all the other code blocks?
    11·2 answers
  • What happens when an arithmetic operator is applied to non-arithmetic data types such as Boolean or character
    7·1 answer
  • Tipos de estructuras A. Expresiones y de variables B. Selectivas y de control C. Instrucciones y parámetros
    5·1 answer
  • Layers allow you to work with one element of an image without disturbing the others true or false​
    15·1 answer
  • What is a non-example for job application???
    11·1 answer
  • Marissa is designing a web page that features lessons on how to build cabinets. how can she make the page most engaging for the
    7·1 answer
  • What is a wiki website?
    11·1 answer
  • 1. Who is affected by electronic theft of a song?
    5·2 answers
  • someone please do this for and send a screeshot or picture please its really important for my examsss :D​
    9·1 answer
  • Find the name of the professor with the maximum percentage of students that failed his course.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!