01 Pseudocode Problems Week 1
01 Pseudocode Problems Week 1
Question 1
Write a Pseudocode program that produces the output shown in Figure 1 below.
Java Programming
Rocks
Figure 1
Question 2
Write a Pseudocode program that prints the answers to the following arithmetic expressions on
separate lines. (Hint: Use PRINT NEW LINE)
NOTE: your program should print the linear expression and the result.
1. 4 × 4 =
2. 3 × 7 + (−2 × −8) =
(2 × 5)−6
3. (4 × 8)−(2 ×3)
=
Page 1 of 2
Noel Carey APS Pseudocode Problems Week 1
Question 3
Write a Pseudocode program that uses two variables number1 and number2 to store the values 71
and 3.14. Your program should print the values stored in number1 and number2 to the screen on
separate lines as shown below in Figure 2.
number1 = 71
number2 = 3.14
Figure 2
Question 4
An employee receives an hourly rate of €9.80 and works 42 hours a week. Write a
Pseudocode program that calculates the employees gross weekly wage and prints it to screen.
NOTE: be very careful when choosing variable types and their names. The output should look like
that shown in Figure 3.
Hourly rate is 9.8
Hours worked is 42
Gross weekly is 411.6
Figure 3
Question 5
Given the following function 𝑓(𝑥) = 𝑥 2 + 3𝑥 − 5, write a Pseudocode program to evaluate
𝒇(𝒙),𝒘𝒉𝒆𝒓𝒆 𝒙 = 𝟒 and 𝒇(𝒙),𝒘𝒉𝒆𝒓𝒆 𝒙 = 𝟔. Your program should print the resulting arithmetic
expressions and the final results. NOTE 𝑥 2 can be written as (𝑥 ∗ 𝑥)
Page 2 of 2