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.
Chapter6: Using Arrays
Section: Chapter Questions
Problem 5E
Related questions
Question
Hello, can you please help me. The
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
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning