Entries by admin

a description of the algorithm in English and, if helpful…

1) a description of the algorithm in English and, if helpful, pseudo-code, 2) at least one worked example or diagram to show more precisely how your algorithm works, 3) a proof (or indication) of the correctness of the algorithm, and 4) an analysis of the running time of the algorithm.

A flowchart AND write pseudocode to design a program that…

A flowchart AND write pseudocode to design a program that computes pay for employees. Allow a user to continuously input employees’ names until an appropriate sentinel value is entered. Also, input each employee’s hourly wage and hours worked. Compute each employee’s gross pay (hours times rate), withholding tax percentage (based on the table below), withholding […]

A function repvec that receives a vector and the number o…

A function repvec that receives a vector and the number of times each element is to be duplicated. The function should then return the resulting vector. Here are some examples of calling the function: >>repvec(5:-1:1,2) ans = 5 5 4 4 3 3 2 2 1 1 >>repvec([0 1 0],3) ans= 0 0 0 1 […]

A human pyramid is a way of stacking people vertically in…

A human pyramid is a way of stacking people vertically in a triangle. With the exception of the people in the bottom row, each person splits their weight evenly on the two people below them in the pyramid. Their “weight”, however, includes not only their own body weight but the weight they are supporting above […]