Part 1- Program Design Elements i. Construct a structure chart with data flow and execution of conditional and loops for program design. Construct a flowchart for the Euclidean Algorithm to illustrate the execution flow of the process. ii.

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
Module
Step 2 Expected Code in C++ Compiler
include dostrean
using namespace std;
void swap (int "x, int "y)
/Function to swap two numbers.
int temp:
temp X;
y:
y = temp;
8
10
11 int ged (int a, int b)
12-(
13
14
15
16
//Function to find GCD of two numbers.
int temp;
if (b
Swap (a, b);
18
do
temp
b;
while (a
return bi
bl. 0);
25
28 int
input
Step 3 Remaining Code Screenshot in Compiler
27
28 int
29 main ()
30-{
int x, y, 2;
cout « "Enter the two numbers to find their GCD\n";
cin >> x >> y:
2 = ged (x, y);
cout « "The GCD of the two numbers " « x c«
return e;
31
32
33
// Taking input of two number to find its output
34
35
36
and « y « " is * <« z;
// printing the GCD
37 }
38
Step 4 Expected Output
Enter the two numbers to find their GCD
36 78
The GCD of the two numbers 36 and 78 is 6
.Program finished with exit code 0
Press ENTER to exit console.
Transcribed Image Text:Module Step 2 Expected Code in C++ Compiler include dostrean using namespace std; void swap (int "x, int "y) /Function to swap two numbers. int temp: temp X; y: y = temp; 8 10 11 int ged (int a, int b) 12-( 13 14 15 16 //Function to find GCD of two numbers. int temp; if (b Swap (a, b); 18 do temp b; while (a return bi bl. 0); 25 28 int input Step 3 Remaining Code Screenshot in Compiler 27 28 int 29 main () 30-{ int x, y, 2; cout « "Enter the two numbers to find their GCD\n"; cin >> x >> y: 2 = ged (x, y); cout « "The GCD of the two numbers " « x c« return e; 31 32 33 // Taking input of two number to find its output 34 35 36 and « y « " is * <« z; // printing the GCD 37 } 38 Step 4 Expected Output Enter the two numbers to find their GCD 36 78 The GCD of the two numbers 36 and 78 is 6 .Program finished with exit code 0 Press ENTER to exit console.
Part 1- Program Design Elements
i.
Construct a structure chart with data flow and execution of conditional and loops for
program design.
ii.
Construct a flowchart for the Euclidean Algorithm to illustrate the execution flow of
the process.
Part 2 - Use of Selection and Loop Control Structures
The following processes/modules will be assessed:
i.
The module that reads x and y.
ii.
The module that finds GCD using the Euclidean algorithm.
iii.
The module that prints GCD.
Transcribed Image Text:Part 1- Program Design Elements i. Construct a structure chart with data flow and execution of conditional and loops for program design. ii. Construct a flowchart for the Euclidean Algorithm to illustrate the execution flow of the process. Part 2 - Use of Selection and Loop Control Structures The following processes/modules will be assessed: i. The module that reads x and y. ii. The module that finds GCD using the Euclidean algorithm. iii. The module that prints GCD.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Structure chart
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
  • SEE MORE 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