Capture1.PNG @ 8 Q Q Capture2.PNG Edt Program Appearance 門 目 Tools Help Larges index 8 Integer Smalestindex Temp Values (Values Th Output "The index of the largest Largester LargestIndex (Integer Array Values Integer) Integer NDEX NDEX- 1-01-1 Return Integer NDEX Values NDEX-Values) 48% Θ ☐ Х 田 الحا Capture3.PNG File Edit Program Appearance Window Tools Help 合區 ·造 ☐ ☑ Capture4.PNG Smalles index B Θ PrintArray (Integer Array Values, Integer num) Integer i Output "PrintArray Execute/ Next 1-010-1 Dene Smalestindex (Integer Array Values Integer Integer INDEX INDEX-0 Next 1-0 to Num-1 Dene Output Values/ False Values(NDEX-Values Return Integer INDEX ☐ ㅁ INDEX-i Capture5.PNG File Edit Program Appearance Window 門 - Capture6.PNG ☑ File Edit Program Appearance Window Tools Help 合區 Swap 目 Θ Swap Integer Temp Temp = Values[Index] Valuesindex1] Values[Index] Valuesindex2] Temp PrintArray(Values, Size) End Swap Integer Temp Temp Values ndex] Values[index] Values Variable Not Declared ☐ ☐ Х About: Before you can store or read data from a variable, it must first be declared. Cause: The variable 'Temp' was not declared Steps: -Define a function PrintArray that takes an array and its size and prints the values stored in the array. The function does not return anything. -Use the function Index, as an example, to define: - A function MaxValueIndex that takes an array and its size and returns the index(position) of the largest element (greatest value) in the array. -A function MinValueIndex that takes an array and its size and returns the index (position) of the smallest element in the array. -Write a function Swap that takes an array, its size and the indexes of two elements and swap their values. Call the function PrintArray from within Swap to print the array after swapping.
Capture1.PNG @ 8 Q Q Capture2.PNG Edt Program Appearance 門 目 Tools Help Larges index 8 Integer Smalestindex Temp Values (Values Th Output "The index of the largest Largester LargestIndex (Integer Array Values Integer) Integer NDEX NDEX- 1-01-1 Return Integer NDEX Values NDEX-Values) 48% Θ ☐ Х 田 الحا Capture3.PNG File Edit Program Appearance Window Tools Help 合區 ·造 ☐ ☑ Capture4.PNG Smalles index B Θ PrintArray (Integer Array Values, Integer num) Integer i Output "PrintArray Execute/ Next 1-010-1 Dene Smalestindex (Integer Array Values Integer Integer INDEX INDEX-0 Next 1-0 to Num-1 Dene Output Values/ False Values(NDEX-Values Return Integer INDEX ☐ ㅁ INDEX-i Capture5.PNG File Edit Program Appearance Window 門 - Capture6.PNG ☑ File Edit Program Appearance Window Tools Help 合區 Swap 目 Θ Swap Integer Temp Temp = Values[Index] Valuesindex1] Values[Index] Valuesindex2] Temp PrintArray(Values, Size) End Swap Integer Temp Temp Values ndex] Values[index] Values Variable Not Declared ☐ ☐ Х About: Before you can store or read data from a variable, it must first be declared. Cause: The variable 'Temp' was not declared Steps: -Define a function PrintArray that takes an array and its size and prints the values stored in the array. The function does not return anything. -Use the function Index, as an example, to define: - A function MaxValueIndex that takes an array and its size and returns the index(position) of the largest element (greatest value) in the array. -A function MinValueIndex that takes an array and its size and returns the index (position) of the smallest element in the array. -Write a function Swap that takes an array, its size and the indexes of two elements and swap their values. Call the function PrintArray from within Swap to print the array after swapping.
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
Related questions
Question
Hello, can you please help me. The
![Capture1.PNG
@
8 Q Q
Capture2.PNG
Edt Program Appearance
門
目
Tools Help
Larges index 8
Integer Smalestindex
Temp Values
(Values
Th
Output "The index of the largest
Largester
LargestIndex
(Integer Array Values Integer)
Integer NDEX
NDEX-
1-01-1
Return Integer NDEX
Values NDEX-Values)
48%
Θ
☐
Х
田
الحا
Capture3.PNG
File Edit Program Appearance Window Tools Help
合區
·造
☐
☑
Capture4.PNG
Smalles index
B
Θ
PrintArray
(Integer Array Values, Integer num)
Integer i
Output "PrintArray Execute/
Next
1-010-1
Dene
Smalestindex
(Integer Array Values Integer
Integer INDEX
INDEX-0
Next
1-0 to Num-1
Dene
Output Values/
False
Values(NDEX-Values
Return Integer INDEX
☐
ㅁ
INDEX-i
Capture5.PNG
File Edit Program
Appearance Window
門
-
Capture6.PNG
☑
File Edit Program Appearance Window Tools Help
合區
Swap
目
Θ
Swap
Integer Temp
Temp = Values[Index]
Valuesindex1] Values[Index]
Valuesindex2] Temp
PrintArray(Values, Size)
End
Swap
Integer Temp
Temp Values ndex]
Values[index] Values
Variable Not Declared
☐
☐
Х
About:
Before you can store or read data from a variable, it must first be declared.
Cause:
The variable 'Temp' was not declared](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F549651ba-b33d-474d-abf4-48863f7a8bc4%2F490df7ff-8343-4a6a-8e09-5e9a892045ef%2Fbv0m8hw_processed.png&w=3840&q=75)
Transcribed Image Text:Capture1.PNG
@
8 Q Q
Capture2.PNG
Edt Program Appearance
門
目
Tools Help
Larges index 8
Integer Smalestindex
Temp Values
(Values
Th
Output "The index of the largest
Largester
LargestIndex
(Integer Array Values Integer)
Integer NDEX
NDEX-
1-01-1
Return Integer NDEX
Values NDEX-Values)
48%
Θ
☐
Х
田
الحا
Capture3.PNG
File Edit Program Appearance Window Tools Help
合區
·造
☐
☑
Capture4.PNG
Smalles index
B
Θ
PrintArray
(Integer Array Values, Integer num)
Integer i
Output "PrintArray Execute/
Next
1-010-1
Dene
Smalestindex
(Integer Array Values Integer
Integer INDEX
INDEX-0
Next
1-0 to Num-1
Dene
Output Values/
False
Values(NDEX-Values
Return Integer INDEX
☐
ㅁ
INDEX-i
Capture5.PNG
File Edit Program
Appearance Window
門
-
Capture6.PNG
☑
File Edit Program Appearance Window Tools Help
合區
Swap
目
Θ
Swap
Integer Temp
Temp = Values[Index]
Valuesindex1] Values[Index]
Valuesindex2] Temp
PrintArray(Values, Size)
End
Swap
Integer Temp
Temp Values ndex]
Values[index] Values
Variable Not Declared
☐
☐
Х
About:
Before you can store or read data from a variable, it must first be declared.
Cause:
The variable 'Temp' was not declared

Transcribed Image Text:Steps:
-Define a function PrintArray that takes an array and its size and prints the values stored in the array.
The function does not return anything.
-Use the function Index, as an example, to define:
- A function MaxValueIndex that takes an array and its size and returns the index(position) of the largest
element (greatest value) in the array.
-A function MinValueIndex that takes an array and its size and returns the index (position) of the
smallest element in the array.
-Write a function Swap that takes an array, its size and the indexes of two elements and swap their
values.
Call the function PrintArray from within Swap to print the array after swapping.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education