please use C++ programming language and please include the comments in the code.

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

***please use C++ programming language and please include the comments in the code. 

Question 2
#include
using namespace std;
void func (int vall, int val2);
int main ()
//line 1
//line 2
7/line 3
//line 4
//line 5
//line 6
cout << "Please enter two integers." << endl; //line 7
//line 8
//line 9
//line 10
//line 11
//line 12
//line 13
int numl, num2;
cin >> num1 >> num2;
func (num1, num2) ;
cout <<
The two integers are " << numl
<< ", " << num2 << endl;
return 0;
void func (int vall, int val2)
//line 14
//line 15
//line 16
//line 17
{
int val3, val4;
val3 = val1 + val2;
//line 18
//line 19
//line 20
val4 = val1 * val2;
cout << "The sum and product are
" << val3
and " << val4 << endl;
}
//line 21
Program 1
(a) In the above Program 1, write line number the marked statements
to show the order in which they will execute (the logical order of execution).
(b) Based on Program 1, identify the following:
i. Function prototype.
ii. Function heading.
jiji, Function body.
iv. Function definition.
v. Function call statement.
vi. Formal parameter & Actual parameter.
(c) Based on answer in (a), find the output of Program 1 given numl=34 and num2=22.
Transcribed Image Text:Question 2 #include using namespace std; void func (int vall, int val2); int main () //line 1 //line 2 7/line 3 //line 4 //line 5 //line 6 cout << "Please enter two integers." << endl; //line 7 //line 8 //line 9 //line 10 //line 11 //line 12 //line 13 int numl, num2; cin >> num1 >> num2; func (num1, num2) ; cout << The two integers are " << numl << ", " << num2 << endl; return 0; void func (int vall, int val2) //line 14 //line 15 //line 16 //line 17 { int val3, val4; val3 = val1 + val2; //line 18 //line 19 //line 20 val4 = val1 * val2; cout << "The sum and product are " << val3 and " << val4 << endl; } //line 21 Program 1 (a) In the above Program 1, write line number the marked statements to show the order in which they will execute (the logical order of execution). (b) Based on Program 1, identify the following: i. Function prototype. ii. Function heading. jiji, Function body. iv. Function definition. v. Function call statement. vi. Formal parameter & Actual parameter. (c) Based on answer in (a), find the output of Program 1 given numl=34 and num2=22.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to Coding
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