COMPUTER PROGRAMMING
SETK 1533
Group Number: 7
Group Name: The 4 Amigos
Group members: (Name, and Student ID)
1. Teow Zi Xian A21ET0241
PROBLEM 1
Step 1: Start
Step 2: Input V1, V2 and V3
Step 3: Check if d is less than 3R, if yes go to Step 4, else go to Step 5.
Step 4: Print “Error”
Step 5: Check if d is less than R, if yes go to Step 6, else go to Step 7.
Step 6: Calculate total volume using V3.
Step 7: Check if d equals to R, if yes go to Step 8, else go to Step 9.
Step8: Calculate total volume using V2.
Step 9: Check if greater than R, if yes go to Step 10, else go to Step 12.
Step 10: Calculate total volume using V1+V2.
Step 11: Print “Volume”
Step 12: Stop
PROBLEM 2
Step 1: Start
Step 2: Input Initial temperature= 75°C, k= 0.02, Ta= 20°C, Loop count= 0
Step 3: Insert the formula 𝑇𝑛𝑒𝑤=𝑇𝑜𝑙𝑑−2𝑘 (𝑇𝑜𝑙𝑑 – 𝑇𝑎), Sum loop=loop count +2
Step 4: Check if Tnew less than 25°C, if yes go to Step 6, else to Step 5.
Step 5: Return Told=Tnew, k=0.02, Ta=20°C, Sum loop= loop count to Step 3.
Step 6: Calculate the total time taken for the process.
Step 7: Print “Tnew” and ‘Total time taken”
Step 8: Stop
PROBLEM 3
Step 1: Start
Step 2: Input Initial conditions of water: T= 25°C+273.15 = 298.15K, P° =23.6 mmHg, and
Antoine coefficients: A=18.3036, B=3816.44, C= - 46.13
Step 3: Insert formula
Step 4: Check if P° > P° max, P° max=1000mmHg, if yes go to Step 7, else go to Step 5.
Step 5: Continue with the heating process
Step 6: Higher temperature is needed
Step 7: Return a warning message and display the final temperature.
Step 8: Stop
PROBLEM 4
Step 1: Start
Step 2: Input m= 300g, T1= 30°C, and T2= 80 °C
Step 3: Read gas
Step 4: Check if the gas is sulfur dioxide, if yes go to Step 5, else go to Step 6.
Step 5: Output a= 3.904 × 10^-2, b= -3.105 × 10^-5, and c= 8.606 × 10^-9
Step 6: Check if the gas is sulfur trioxide, if yes go to Step 7: else go to Step 8.
Step 7: Output a= 9.188 × 10^-2, b= -8.540 × 10^-5, and c= 32.40 × 10^-9
Step 8: Check if the gas is oxygen, if yes go to Step 9, else go to Step 10.
Step 9: Output a= 1.158 × 10^-2, b= -0.6076 × 10^-5, and c= 1.311 × 10^-9
Step 10: Check if the gas is nitrogen, if yes go to Step 11, else go to Step 12.
Step 11: Output a= 0.2199 × 10^-2, b= -0.5723 × 10^-5, and c= -2.871 × 10^-9
Step 12: Print “warning”
Step 13: Calculate the energy required using the formula 𝑄=𝑚[𝑎+2𝑏(𝑇2−𝑇1)+3𝑐(𝑇2−𝑇1)^2]
Step 14: Print “Q”
Step 15: Stop
PROBLEM 5
Step 1: Start
Step 2: Input Cyclones: 𝐶𝑝=exp [9.2227−0.7892 (ln(𝐹𝐺)+0.08487ln(𝐹𝐺))]^2,
Venturi scrubbers: 𝐶𝑝=exp [9.6155−0.3281 (ln(𝐹𝐺)+0.0500ln(𝐹𝐺))]^2, and
Bag filters: 𝐶𝑝=exp [10.258−0.4381(ln(𝐹𝐺)+0.05563ln(𝐹𝐺))]^2
Step 3: Check if the gas flowrate is less than 200, if yes go to Step 4, else go to Step 5.
Step 4: Key in again
Step 5: Check if the gas flowrate is 200≤F<2000, if yes go to Step 6, else go to Step 7.
Step 6: Print “Cyclones”
Step 7: Check if the gas flowrate is 2000≤F<5000, if yes go to Step 8, else go to Step 9.
Step 9: Print “Cyclones” or “Venturi scrubbers”
Step 10: Check if the gas flowrate is 5000≤F<20000, if yes go to Step 11, else go to Step 12.
Step 11: Print “Cyclones” or “Venturi scrubbers” or “Bag filters”
Step 12: Check if the gas flowrate is 20000≤F<100000, if yes go to Step 13, else go to Step
14.
Step 13: Print “Cyclones” or “Bag filters”
Step 14: Check if the gas flowrate is 100000≤F<200000, if yes go to Step 15, else go to Step
16.
Step 15: Print “Bag filters”
Step 16: Check if the gas flowrate is greater than 200000, if yes go to Step 17, else go to Step
18.
Step 17: Key in again
Step 18: Stop