subject

2. Write these functions definitions: d) Function div2Numbers () that divides 2 integers.
Compile and test your function with the following main function:
int main()
1
char op;
cout<<"Enter + to add 2 integers\n";
cout<<"Enter - to subtract 2 integers\n";
cout<<"Enter x to multiply 2 integers\n";
cout<<"Enter / to divide 2 integers\n";
cout<<"Enter the operator required: ";
cin>>op;
switch (op)
{
case '+': add2 Numbers (); break;
case '-': sub2 Numbers (); break;
case 'x' : mul2 Numbers (); break;
case '/': div2 Numbers (); break;
default: cout<<"Invalid operator entered\n";
break;
}
a) Function add2 Numbers () that adds 2 integers.
b) Function sub2 Numbers () that subtracts 2 integers.
c) Function mul2Numbers () that multiplies 2 integers.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:50, Cnolteb5663
Is one of the most injurious events that can happen to a person in a crash.
Answers: 1
image
Computers and Technology, 22.06.2019 04:00, yolo1430
Acetylene is a gas which burns rapidly on its own, and is considered highly explosive. a) true b) false
Answers: 2
image
Computers and Technology, 23.06.2019 11:50, itaheart101
While preforming before operation pmcs, you notice the front right tire appears slightly under-inflated. what is the proper action?
Answers: 3
image
Computers and Technology, 23.06.2019 12:30, Prettygirlyaya
How is the brightness of oled of the diaplay is controled
Answers: 1
You know the right answer?
2. Write these functions definitions: d) Function div2Numbers () that divides 2 integers.
Comp...

Questions in other subjects:

Konu
Mathematics, 12.08.2020 04:01
Konu
Mathematics, 12.08.2020 04:01