Executive Training School offers typing classes. Each final exam evaluates a student's typing speed and the number of typing errors made. Develop the logic for a program that produces a summary table of each examination's results. Each row represents the number of students whose typing speed falls within the following ranges of words per minute: 0-19, 20-39, 40-69, and 70 or more. Each column represents the number of students who made different numbers of typing errors -0 through 6 or more.
pseudocode
speed is the array containing the typing speed of each student.
error is the array containing the error made by each student.
n is the number of students.
We assume array is indexed from 0.
PSEUDOCODE:
typingSummary(speed[],errors[],n)
{
count[4][2]; //we create a 4x2 matrix
for i=0 to n-1
{
if(speed[i]>=0 and speed<=19)
row=0;
elseif(speed[i]>=20 and speed<=39)
row=1;
elseif(speed[i]>=40 and speed<=69)
row=2;
elseif(speed[i]>=70)
row=3;
if(errors[i]>=0 and errors[i]<=6)
col=0;
elseif(errors>6)
col=1;
count[row][col];
}
display count;
}
Get Answers For Free
Most questions answered within 1 hours.