Complete the following given program by adding the missed lines in the answer area: Write the prototypes for two user-defined functions (requestint & comparelnts) that are missing in the program (below line 6) • Write the function call for function displayInfo missed at line 13 (to display program message) Write the function call for function comparents missed at line 20 (to compare two given integers) • Note: this function takes the entered integers as input and display the comparison result Write the header of the function definition for function displayInfo missed at line 26 Write the header of the function definition for function requestint missed at line 36

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
100%
1 //Compare2Numbers.cpp
2 #include <iostream>
using namespace std;
3
4
5 //function prototypes
6 void displayInfo();
7
8
9
10 int main()
11- {
12
13
14
15
16
17
18
19
20
21
22
23 }
27. {
28
29
30
31
32
33
24
25 //function definition for display Info
26
}
34
35
36
37 - {
38
//function call to display program message
39
40
41
42
43
44 }
45
50
51
52-
53
54
55-
56
57
58
//function calls to request two integers
int num1 requestInt ();
int num2= requestInt ();
//function call to compare two integers
return 0;
cout << "This program is to compare two user-entered integers.\n";
cout << "You will learn three parts of a user-defined function: \n";
Function definition - define the task\n";
cout <<
~Function call invoke the performance\n";
N Function prototype indicate how to call\n\n";
cout <<
cout <<
"
#
//function definition for requestint
P
int num;
cout << "Please enter an integer:
cin >> num;
return num;
46 //function definition for compareInts
47 void compareInts (int num1, int num2)
48 {
49-
if (num1>num2) {
cout << "\nThe first number is bigger.\n";
}
else if (num1<num2) {
cout << "\nThe second number is bigger. \n";
}
else {
cout << "\nTwo numbers are the same.\n";
}
Transcribed Image Text:1 //Compare2Numbers.cpp 2 #include <iostream> using namespace std; 3 4 5 //function prototypes 6 void displayInfo(); 7 8 9 10 int main() 11- { 12 13 14 15 16 17 18 19 20 21 22 23 } 27. { 28 29 30 31 32 33 24 25 //function definition for display Info 26 } 34 35 36 37 - { 38 //function call to display program message 39 40 41 42 43 44 } 45 50 51 52- 53 54 55- 56 57 58 //function calls to request two integers int num1 requestInt (); int num2= requestInt (); //function call to compare two integers return 0; cout << "This program is to compare two user-entered integers.\n"; cout << "You will learn three parts of a user-defined function: \n"; Function definition - define the task\n"; cout << ~Function call invoke the performance\n"; N Function prototype indicate how to call\n\n"; cout << cout << " # //function definition for requestint P int num; cout << "Please enter an integer: cin >> num; return num; 46 //function definition for compareInts 47 void compareInts (int num1, int num2) 48 { 49- if (num1>num2) { cout << "\nThe first number is bigger.\n"; } else if (num1<num2) { cout << "\nThe second number is bigger. \n"; } else { cout << "\nTwo numbers are the same.\n"; }
Complete the following given program by adding the missed lines in the answer area:
Write the prototypes for two user-defined functions (requestint & compareints) that are missing in the program (below line 6)
• Write the function call for function displayinfo missed at line 13 (to display program message)
• Write the function call for function comparelnts missed at line 20 (to compare two given integers)
o Note: this function takes the entered integers as input and display the comparison result
Write the header of the function definition for function displayInfo missed at line 26
Write the header of the function definition for function requestint missed at line 36
Transcribed Image Text:Complete the following given program by adding the missed lines in the answer area: Write the prototypes for two user-defined functions (requestint & compareints) that are missing in the program (below line 6) • Write the function call for function displayinfo missed at line 13 (to display program message) • Write the function call for function comparelnts missed at line 20 (to compare two given integers) o Note: this function takes the entered integers as input and display the comparison result Write the header of the function definition for function displayInfo missed at line 26 Write the header of the function definition for function requestint missed at line 36
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Variables
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