Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:30, lilobekker5219
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
image
Computers and Technology, 23.06.2019 14:00, camiserjai1832
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
image
Computers and Technology, 24.06.2019 02:10, ttangelique
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
image
Computers and Technology, 24.06.2019 11:00, dirttrackr75
Which of the statements below describe the guidelines for the use of text in presentation programs? a. do not use numbered lists. b. fonts should be appropriate for your audience. c. limit the number of fonts you use to three or four. d. only use bulleted lists for sales promotions. e. select font sizes that are appropriate for your delivery method. f. use font colors that work well with your background. select all that apply
Answers: 1
Do you know the correct answer?
2. Write these functions definitions: d) Function div2Numbers () that divides 2 integers.
Comp...

Questions in other subjects:

Konu
Mathematics, 24.04.2021 18:40
Konu
Mathematics, 24.04.2021 18:40