Start
//declare the variables
String employeeName
Real hoursWorked
Real hourlyPayRate
Real grossPay
Real netPay
Real taxRate
Integer const MAX_EMPLOYEES = 250
Integer employeeCount
Boolean continue
Character inputChar
Call displayOpeningMessage
//initialize the loop control variables
employeeCount = 0
continue = true
//process employees until user wants to stop or maximum number
//of employees have been reached
while (continue = true AND employeeCount <= MAX_EMPLOYEES )
Display "Do you want to process employee's pay?
Display "Enter 'Y' to continue, 'N' to stop"
Get inputChar
If (inputChar = 'Y' OR inputChar = 'y')
employeeCount = employeeCount + 1
Call getInput
Call calculatePay
Call displayOutput
Else
Continue = false
End if
end while
Display employeeCount, " employees have been processed"
Call displayTerminationMessage
Stop
Module displayOpeningMessage
//provide a welcome statement and directions
Display "Pay Calculator"
Display "Enter the requested values to calculate the gross pay for an employee"
End Module
Module getInput
//get the input
Display "Enter the Employee's name"
Input employeeName
Display "Enter the number of hours worked"
Input hoursWorked
Display "Enter the hourly pay rate"
Input hourlyPayRate
End Module
Module calculatePay
calculateGrossPay
calculateNetPay
end Module
Module calculateGrossPay
//calculate the gross Pay
Set grossPay = hourlyPayRate * hoursWorked
End Module
Module calculateNetPay
//find the tax rate, then calculate netPay
//note do not need to check for lower bound
//since lower bound is checked as the upper bound of the
//previous condition
If grossPay < 1500 then
taxRate = .15
else if grossPay < 3000 then
taxRate = .19
else if grossPay < 5000 then
taxRate = .21
else if grossPay < 6000 then
taxRate = .23
else
taxRate = .27
End if
netPay =grossPay * (1 - taxRate) //same as grossPay - grossPay*taxRate
End Module
Module displayOutput
//display the output
Display "The gross pay for ", employeeName, "is: "
Display "Hours worked: ", hoursWorked
Display "Hourly pay rate: ", hourlyPayRate
Display "Gross Pay: ", grossPay
Display "Tax Rate: ", taxRate
Display "Net Pay: ", netPay
End Module
Module displayTerminationMessage
//display termination message
Display "Thank you for using Pay Calculator"
Display "Enter any key to quit"
End Module
one- input tables and three input tables
a formula
Total yield in a unit in a unit input. Graphically the production yield can be plotted against the unit input to determine the production yield at any point.
Domain
All i know it is about science. If anybody knows please reply :}
Declare Names[100], Salaries[100]Set Sum = 0Set Count1 = 0Set K = 1Write "Enter Employees Name and Salary."Write "Enter *,0 when done."Input Name, SalaryWhile Salary "0"Set Count1 = Count1 + 1Set Sum = Sum + SalaryWrite "Enter another Employee Name and Salary (enter *,0 when done)"Input Name, SalaryEnd WhileSet Average = Sum / Count1Set Count2 = 0Set Count3 = 0For K = 1 Step 1 to Count1If Salary[K] > Average ThenSet Count2 = Count2 + 1End IfIf Salary[K] < Average ThenSet Count3 = Count3 + 1End IfEnd ForWrite "The Average Salary is: $", AverageWrite "The number of Salaries Above theAverage Salary is:", Count2Write "The number of Salaries Below theAverage Salary is:", Count3
Start Input x, y ; If (x
input number for loop = 1 to 3 inclusive print number end for
input price calc tip = price*0.15 print tip
People are naturally afraid of MIS technology, ie ...how will it be used... against them? Consistency and reliability of input by employee, managements reaction or inaction regarding employee input.
Oh, converting Fahrenheit to Celsius is like painting a happy little tree. Here's a simple pseudocode for you: Input the temperature in Fahrenheit Subtract 32 from the Fahrenheit temperature Multiply the result by 5/9 to get the temperature in Celsius Just remember, there are no mistakes in pseudocode, only happy little accidents.
The order of operations. Variables must be declared before they are used.
PERFORM GET_ NUMBER 10 TIMES AVERAGE = AVERAGE/10 GET_NUMBER: INPUT = a$ AVERAGE = AVERAGE + INPUT
Declare Real price=49.95 Display "the original price." Input item original price Display "price"
101
public class Payroll { // main method begins execution of Java application public static void main( String args[] ) { // create Scanner to obtain input from command window Scanner input = new Scanner( System.in ); char name; // employee's name int number1; // hourly rate int number2; // number of hours worked for the week int product; // product of number1 and number2 System.out.print( "Enter employee's name: " ); // prompt user to input name name = input.nextLine(); //read employee's name from user's input System.out.print( "Enter hourly rate: " ); // prompt user for employee's hourly rate number1 = input.nextInt(); // read hourly rate from user's input System.out.print( "Enter hours worked for the week: " ); // prompt user to enter number of hours worked for the week number2 = input.nextInt(); // read number of weeks from user's input product = number1 * number2; // multiply numbers System.out.printf( "The Employee" , name ); // displays employee's name System.out.printf( "weekly pay is $%d\n" , product ); // displays weekly pay } // end method main } // end class Payroll
Ideally you'd want to use a DBMS to store and retrieve the employee data, but we'll keep it simple and use some static data instead.#include#include#include#includestruct employee{std::string m_name;unsigned m_id;employee(std::string name, unsigned id): m_name(name), m_id(id) {}};std::vector employees;void load_data (){employees.push_back (employee ("Alan", 1));employees.push_back (employee ("Brian", 2));employees.push_back (employee ("Charles", 3));employees.push_back (employee ("David", 4));employees.push_back (employee ("Eric", 5));}unsigned input_id (std::string prompt){unsigned id = 0;while (1){std::cout