needs to be in basic pseudocode. with no specific language. I am looking for the
ID: 3869282 • Letter: N
Question
needs to be in basic pseudocode. with no specific language.
I am looking for the pseudoccode to look just like this.
start
Declarations
num itemPrice
num salespersonCommission
num customerDiscount
output “Welcome to the sales price calculator.”
output “This program will help you calculate the final”,
"price of a product adding in all factors.”
finalPrice= calculatePrice()
output “The total price after Commission, $” salespersonCommission, “and customer discount,”
“ customerDiscount “%, is”, finalPrice
stop
Please. this is the 3rd time I've posted this trying to get someone to help with the answer that I need in the way I need it.
2) A company maintains its employee records in a sequential text file named employees.txt. The record for each employee contains the following: ID number, employee’s name, hourly pay, hours worked, benefits contribution, retirement account contribution.
Assume that the following declarations have already been made
num id
string employeeName
num hourlyPay
num hoursWorked
num benefitsContribution
num retirementContribution
num grossPay
num incomeTax
num netPay
Declare any other variables and constants that are needed and write pseudocode so that your program can
a) Read each record in the employees.txt file
b) Calculate the employee’s gross pay, based on their hourly pay and how many hours they worked
c) Calculate the employee’s net pay after deducting the following:
i) the benefits contribution
ii) the retirement account contribution
iii) income tax, based on the following scale:
(1) gross pay of 1,000 or more: 10%
(2) gross pay of 750 or more but less than 1000: 7.5%
(3) gross pay of 500 or more but less than 750: 5%
d) Write the employee data along with the gross pay, benefits and retirement account contributions, income tax (in dollars), and net pay to another file named payroll.txt
Explanation / Answer
#include <stdio.h>
int calculatePrice(int ip, int sc,int cd);
int main () {
Int ip=500;
Int sc=30;
Int cd=10;
printf(“Welcome to the sales price calculater”);
printf(“This program will help you calculate the final price of the product adding in all factor”);
finalPrice=calculatePrice();
printf(“FInal price after salesperson commision and customer discount is %s”,finalPrice);
return 0;
}
int calculatePrice(int ip, int sc,int cd) {
int r,s,t,u,v;
r=ip/100*sc;
s=ip+r;
u=s/100*t;
v=s-u;
return result;
}
Note-For other questions to be answered please provide as seprate questions
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.