You are on page 1of 13

Building a program to identify and organize data more efficiently for convenience

For x:=1 to 20 do

Step 1: START

Step 2: Input User ID

Step 3: Set User ID ←User ID

Step 4: Input User Ln

Step 5: Set User Ln ← User Ln

Step 6: Input User Fn

Step 7: Set User Fn ← User Fn

Step 8: Input Date

Step 9: Set Date ← Date

Step 10: Input Description

Step 11: Set Description ← Description

Step 12: Input Accom

Step 13: Set Accom ← Accom

Step 14: Input Transportation

Step 15: Set Transportation ← Transportation

Step 16: Input Taxes

Step 17: Set Taxes ← Taxes

Step 18: Input Fuel

Step 19: Set Fuel← Fuel

Step 20: Input Meals

Step 21: Set Meals ← Meals

Step 22: Input Phone

Stepp 23: Set Phone ← Phone

Step 24: Input Entertainment

Step 25: Set Entertainment ← Entertainment

Step 26: Set Total


Step 27: Set Total ← Total

Step 28: Input Total Expense

Step 29: Set Total Expense ← Total Expense

Step 30: Input Expense Status

Step 31: Set Expense Status ← Expense Status

Step 32: Input User ID

Step 33: Set User ID ←Emp ID

Step 34: Input User Ln

Step 35: Set User Ln ← User Ln

Step 36: Input User Fn

Step 37: Set User Fn ← User Fn

Step 38: Set Date ← Date

Step 39: Input Description

Step 40: Set Description ← Description

Step 41: Input Accom

Step 42: Set Accom ← =SUM(F3:F22)

Step 43: Input Transportation

Step 44: Set Transportation ← =SUM(G3:G22)

Step 45: Input Taxes

Step 46: Set Taxes ← =SUM(H3:H22)

Step 47: Input Fuel

Step 48: Set Fuel← =SUM(I3:I22)

Step 49: Input Meals

Step 50: Set Meals ← =SUM(J3:J22)

Step 51: Input Phone

Step 52: Set Phone ← Phone

Step 53: Input Entertainment

Step 54: Set Entertainment ← =SUM(L3:L22)

Step 55: Input Total Expense


Step 56: Set Total Expense ← Total Expense

Step 57: Input Expense Status

Step 58: Set Expense Status ← Expense Status


If T_exp > 10000 then
=if(N5>10000,"CUT BACK","NORMAL")

Display User ID

Display User Ln

Display User Fn

Display Date
Display Description
Display Accom
Display Trans
Display Meals
Display Phone
Display Entertainment
Display Total
Display Total Expense
Copy showing steps of Pseudocode

Picture showing name of group members, school, date and Name of the program
Picture showing beginning of While loop and Section initializing variables
Picture showing Write line asking for use information and Read lines reading user input
Picture showing the calculation of total and total expense, the If statement and output of information
inputted into program

Picture showing the end of the program

Picture showing program working

//Jaden Williams, Zepheniah Raja France, Camron Williams, Marlon Scott, Jeremy Brown

//School - Saint Martin's Secondary School

//Date - 2022-2023

//Name of the program

program Blue_bills;

var
//Declaring variables

x:integer;

User_ID:integer;

User_LN:string;

User_FN:string;

date:integer;

description:string;

accom:real;

trans:real;

taxes:real;

fuel:real;

meals:real;

phone:integer;

entertainment:real;

Total:real;

total_expense:real;

salary:real;

allowance:real;

income:real;

gross_income:real;

net_income:real;

begin

//While loop is repeating for 20 more users


while x<= 20 do

begin

//Section initializing variables

x:=0;

User_ID:=0;

User_LN:='';

User_FN:='';

date:=0;

description:='';

accom:=0;

trans:=0;

taxes:=0;

fuel:=0;

meals:=0;

phone:=0;

entertainment:=0;

total:=0;

total_expense:=0;

salary:=0;

allowance:=0;

income:=0;

gross_income:=0;

net_income:=0;

//Write lines asking for user information

//Read lines reading user input


writeln('Please enter allowance');

readln(allowance);

writeln('Please enter salary');

readln(salary);

writeln('Please enter User_ID');

readln(User_ID);

writeln('Please enter User_LN');

readln(User_LN);

writeln('Please enter User_FN');

readln(User_FN);

writeln('Please enter date');

readln(date);

writeln('Please enter description');

readln(description);

writeln('Please enter accommodation');

readln(accom);

writeln('Please enter taxes');

readln(taxes);

writeln('Please enter fuel');

readln(fuel);

writeln('Please enter meals');

readln(meals);

writeln('Please enter phone');

readln(phone);

writeln('Please enter entertainment');

readln(entertainment);

writeln('Please enter allowance');

//Calculating total and total expense


total:=accom+trans+taxes+fuel+meals+entertainment;

total_expense:=total+accom+trans+taxes+fuel+meals+entertainment;

gross_income:=salary+allowance;

net_income:=gross_income-total_expense;

// If statement being used to check if information is true or false

If (net_income > 10000) then

writeln('cutback')

else

writeln('normal');

//Output of information inputted into program

writeln('Your allowance is', allowance);

writeln('Your salary is', salary);

writeln('Your User_ID is', User_ID);

writeln('Your User_LN is', User_LN);

writeln('Your User_FN is', User_FN);

writeln('Your date is', date);

writeln('Your description is', Description);

writeln('Your accommodation is', accom);

writeln('Your Transportation is', trans);


writeln('Your Taxes is', Taxes);

writeln('Your Fuel is', Fuel);

writeln('Your Meals is', Meals);

writeln('Your Phone is', Phone);

writeln('Your Entertainment is', Entertainment);

writeln('Your Total is', Total);

writeln('Your total_expense is', total_expense);

writeln('Your Income is', income);

writeln('Your Gross Income is', gross_income);

writeln('Your Net Income is', net_income);

//Loop is ended

end;

//Program is ended

end.

Copy of Pseudo Code


Picture showing the Trace Table

You might also like