0% found this document useful (0 votes)
3 views

Array Questions

The document contains pseudocode instructions for various array-related tasks, including inputting and outputting scores, calculating sums and averages, finding maximum values, performing linear searches, and sorting arrays using bubble sort. Each task is clearly defined with specific requirements for input, processing, and output. The document serves as a guide for implementing these operations in programming.

Uploaded by

tharushanadini17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Array Questions

The document contains pseudocode instructions for various array-related tasks, including inputting and outputting scores, calculating sums and averages, finding maximum values, performing linear searches, and sorting arrays using bubble sort. Each task is clearly defined with specific requirements for input, processing, and output. The document serves as a guide for implementing these operations in programming.

Uploaded by

tharushanadini17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ARRAY QUESTIONS

1. A program stores the scores of 10 students in a one-dimensional array called Scores.

Write pseudocode to:

o Input all 10 scores


o Output all scores greater than 50

2. Write pseudocode to:

o Input 8 integers into an array called Data


o Calculate and output the sum and average of the values

3. Write pseudocode to:

o Find and output the maximum value stored in a one-dimensional array Temperatures of size 12

4. A list of 20 student names is stored in an array StudentNames.

Write pseudocode to:

o Input a name
o Use a linear search to determine if the name exists in the array
o Output "Found" or "Not Found" accordingly

5. An array IDs stores 10 student ID numbers.

Write pseudocode to:

o Input an ID to search for


o Perform a linear search
o Output the position (index) if found, otherwise output “ID not found”

6. An array Numbers contains 6 integers.

Write pseudocode to:

o Sort the array in ascending order using the bubble sort algorithm

7. Modify your bubble sort pseudocode to count the number of passes needed to completely sort the array.
Output the pass count at the end.
8. Write pseudocode to sort an array of 10 integers in descending order using the bubble sort algorithm.

9. Write pseudocode to:

o Input 10 integers into an array


o Sort the array in ascending order using bubble sort
o Ask the user to enter a number
o Search for the number using linear search
o Output whether it was found and its position

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy