Programming Concepts - 1D 2D
Programming Concepts - 1D 2D
1. Write a pseudocode to store full name of each student at school the admission process. Full
name will contain First name, Middle Name and Last Name. Prompt messages to input each
name separately and store in a 2D array studentname[]. Assume school will get register 60
students per year. Student ID used as the index of the 2D array (starting from 1100 to 1160)
2. A data logger records the temperature on the roof of a school every hour. Input and store the
temperatures recorded for a month in a 2D array named dailytemp[]. Assume that there are
30days in a month. Decide your own validation rules and validate all the temperatures on
• Calculate the average daily temperature and store in another1D array avgtemp.
Your program must include appropriate prompts for the entry of data.
3. Input and store the names and marks for 30 students who have sat three computer science
tests. Test 1 is out of 20 marks, Test 2 is out of 25 marks, Test 3 is out of 35 marks. You must
store the names in a one-dimensional array and the marks and total score for each student in
one-dimensional arrays. All the marks must be validated on entry and any invalid marks
rejected. You may assume that the students’ names are unique.
Calculate and store the total score for each student and calculate the average score for the
whole class. Output each student’s name followed by their total score, then output the
Select the student with the highest score and output their name and score.
4. Names of students are stored in the one-dimensional (1D) array Student [] of type string. A
separate two-dimensional (2D) array Data [] stores the latest data recorded about each
student. The array already contains the readings taken by a teacher for each student:
• weight
The StudentID given to the student is used for the index on both arrays, this is a value between
1 and 50 inclusive.
The data of students is used to calculate the BMI (BMI = (height*height)/weight). According to
➢ Normal weight = BMI should be within the range of 18.5 to 24.9 (inclusive)
Write a procedure, using pseudocode or program code, to output the Student Name, BMI value