Knowee
Questions
Features
Study Tools

write an algorithm in pseudocode, to print 50 names and 50 ID-numbers that have been stored in an 2D array

Question

write an algorithm in pseudocode, to print 50 names and 50 ID-numbers that have been stored in an 2D array

🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, here is a simple pseudocode to print 50 names and 50 ID-numbers from a 2D array:

1. Start
2. For i = 0 to 49
3.     Print "Name: ", array[i][0]
4.     Print "ID: ", array[i][1]
5. End For
6. Stop

In this pseudocode:

  • We start a loop from 0 to 49, which gives us 50 iterations (Step 2 and 5).
  • In each iteration, we print the name and ID-number from the 2D array (Step 3 and 4).
  • The name is assumed to be stored in the first column (index 0) and the ID-number in the second column (index 1) of the 2D array.
  • We stop the program after printing all the names and ID-numbers (Step 6).

This problem has been solved

Similar Questions

Algorithm/ Pseudocode

Write a program that takes an array of integers as input and prints all its subarrays, ensuring that they are sorted based on the forward direction and the count of elements.Constraints:The length of the array is at least 1 and at most 100.Each element of the array is an integer between -1000 and 1000.Input:The input consists of two lines. The first line contains an integer, n, which is the length of the array. The second line contains n space-separated integers, representing the elements of the array.Output:The program should print all the subarrays of the given array in increasing order, one subarray per line.

A company has 600 employees whose names are currently stored using a collectioncalled NAMES. The names are stored as surname, first name. For example: Smith, Jane,Uysal, Rafael, Ahmed, Ishmael, Jonsonn, Sara, …(a) Construct a pseudocode algorithm that will store the surnames in one array andfirst names in another.

What will be the output of the following Pseudocode?Integer i, j, sum, nSet sum = 0 , n = 7Repeat for i = 1 to n            Repeat for j = 1 to i - 1                        sum = sum + j            End loopEnd loopPrint sum

Construct a Pseudocode to take three numbers and print largest and smallest among them.

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.