Solving problems using algorithms


In the given problems, you will require to:

a) Define the problem by constructing a defining diagram.
b) Make a solution algorithm by using pseudocode.
c) Desk checks the solution algorithm by using two valid test cases.

Question 1: Construct an algorithm which will prompt an operator to input three characters, receive those three characters and display a welcoming message to the screen like 'Hello xxx! We hope you have a nice day'.

Question 2: You need an algorithm which will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient.

Question 3: You need an algorithm which will receive an integer from the screen, add 5 to it, double it, subtract 7 from it, and display the final number to screen.

Question 4: You need an algorithm which will read in a tax rate (as a percentage) and the prices of five items. The program is to compute the total price, before tax, of the items, then the tax payable on such items. The tax payable is computed by applying the tax rate percentage to the total price. Print the total price and the tax payable as output.

Question 5: You need an algorithm to read in one customer's account balance at the starting of the month, a total of all withdrawals for the month and a total of all deposits made throughout the month. A federal tax charge of 1 % is applied to all trans¬actions made throughout the month. The program is to compute the account balance at the end of the month by:

a) Subtracting the total withdrawals from the account balance at the starting of the month,
b) Adding the total deposits to this new bal¬ance,
c) Computing the federal tax (1 % of total transactions - that is, total with¬drawals + total deposits), and
d) Subtracting this federal tax from the new balance. After such computations, print the final end-of-month balance.

Question 6: You need a program to read in the values from an employee's time sheet, and compute and print the weekly pay owing to that employee. The values read in are the total number of regular hours worked the total overtime hours and the hourly wage rate. Weekly pay is computed as payment for regular hours worked, plus payment for overtime hrs worked. Payment for regular hours worked is computed as (wage rate times regular hrs worked); payment for overtime hours worked is computed as (wage rate times overtime hrs worked times 1.5).

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Solving problems using algorithms
Reference No:- TGS05770

Expected delivery within 24 Hours