Q1: Nrite a C+ program to create a header have a function that multiply two nunbers. Then call the funet ion in the main code to multiply the following nunbers and display the results on the screen: a) 5, 3 b) 7, 2

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
li,
M 1:YO
Mid2_A3.pdf →
Q1: Nrite a C++ progran to create a header have a function that multiply two
nunbers. Then call the function in the main code to multiply the following
nunbers and display the results on the scrcen:
a) 5, 3
b) 7, 2
Q2: What is the output for the following codes:
1-
a) 8 25 1
c) 8 25
b) 152
di 1528
int arr[4]= (1, 5, 2, 8}:
for (int i 3; i>-0; i--)
cout<<arrli] <<" ";
2-
a) 48 3
c) 483
b) 4 8
d) 4
int arr[4]= (4, 8, 3, 1};
for (int i- 0; i<2; i++)
cout<<ar[i]<<" *;
3-
a) 36 8 23
c) 6 9 11
b) 368 2
d) 6 9 11 5
int arr[4]= (3, 6, 8, 2):
for (int i- 0; i<4; i++)
cout<<arrfi] +3<<" ":
4-
a) 6 3 27
c) 6 3 2
b) 9 E5
d) 9 65 10
int arr[4]- (9, 6, 5, 10):
for (int i 0; i<3; i++)
cout<<arr[i) -3 <*
5-
int arr[4)= (3, 4, 5, 1}3:
for (int i- 0; i<4; i++)
cout<<arr(i)* 3 << *:
a) 9 12 15
b) 9 12 15 3
c) 3 451
d) 3 45
6-
a) 555
c) 8 8 8
int arr[4]- (9, 5, 8, 2}:
for (int i 0; i<3; i++)
cout<carr[2]<<" :
b) 958
di B B 8 B
7-
int an(4]- (7, 1, 5, 3}:
for (int i- 0; i-2; i++)
cout<arrfi) * arrfi] << " ":
bị 49 1 25 9
a) 49 1
c) 715
d) 49 1 25
II
<>
Transcribed Image Text:li, M 1:YO Mid2_A3.pdf → Q1: Nrite a C++ progran to create a header have a function that multiply two nunbers. Then call the function in the main code to multiply the following nunbers and display the results on the scrcen: a) 5, 3 b) 7, 2 Q2: What is the output for the following codes: 1- a) 8 25 1 c) 8 25 b) 152 di 1528 int arr[4]= (1, 5, 2, 8}: for (int i 3; i>-0; i--) cout<<arrli] <<" "; 2- a) 48 3 c) 483 b) 4 8 d) 4 int arr[4]= (4, 8, 3, 1}; for (int i- 0; i<2; i++) cout<<ar[i]<<" *; 3- a) 36 8 23 c) 6 9 11 b) 368 2 d) 6 9 11 5 int arr[4]= (3, 6, 8, 2): for (int i- 0; i<4; i++) cout<<arrfi] +3<<" ": 4- a) 6 3 27 c) 6 3 2 b) 9 E5 d) 9 65 10 int arr[4]- (9, 6, 5, 10): for (int i 0; i<3; i++) cout<<arr[i) -3 <* 5- int arr[4)= (3, 4, 5, 1}3: for (int i- 0; i<4; i++) cout<<arr(i)* 3 << *: a) 9 12 15 b) 9 12 15 3 c) 3 451 d) 3 45 6- a) 555 c) 8 8 8 int arr[4]- (9, 5, 8, 2}: for (int i 0; i<3; i++) cout<carr[2]<<" : b) 958 di B B 8 B 7- int an(4]- (7, 1, 5, 3}: for (int i- 0; i-2; i++) cout<arrfi) * arrfi] << " ": bị 49 1 25 9 a) 49 1 c) 715 d) 49 1 25 II <>
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education