Write the pseudocode for a program that accepts a series of integers (the user should decide how many) and stores them in an array. The program should then pass these values one at a time to a function called even which returns 1 if the number is even and 0 if the number is odd.
Write the pseudocode for a program that uses a two-dimensional array to compute and display the multiplication table shown below. The user should decide the value of n in the example below its 6: (5 Marks) * 1 2 3 4 5 6
1 2 2 3 4 5 6
2 2 4 6 8 10 12
3 3 6 9 12 15 18
4 4 8 12 16 20 24
program that computes the area of either a rectangle, a circle or a right-angled triangle. The program should display a menu that enables the user to select the type of figure whose area he/she wants to compute. Depending on the user’s choice, the program should prompt for the dimensions and perform the computations. The output should be: - The type of figure, the dimensions and the area. Define three functions: - one to compute the area of a rectangle, one the area of a circle and one the area of a triangle. NB: 1. The calculation should be for only one figure at any one time.
2. Computations should be done in the user-defined functions.
An Islamic bank wants you to develop a Zakat Calculator for them. The calculator shall take the input of the:
1) name of zakat donor,
2) Bank_Balance
3) zakat_amount.
Create constructor to initialize variables with default values which will be called on the time of object instantiation.
There should be a method named “Cal_zakat()” which calculates the zakat of each donor and set in zakat_amount. The program adds up the zakat of each donor hence calculating the total_zakat of the bank. Use a “display()” which displays not only the data of the donor but also the total amount of zakat of the bank. It should keep in mind that the zakat will be calculated only if Bank_Balance is greater than or equal to 20,000
Problem 3
Var x;
While (x <= 5) {
Print ();
x = x + 1;
}
What is the answer?
1. If x = 3
Answer = ?
2. If x = 1
Answer = ?
Problem 2
Var price;
Var item;
If (item >= 10)
Print (price * item);
Else
Print (price);
What is the answer?
1. If price = 5
Item = 9
Answer = ?
2. If price = 5
Hours = 15
Answer = ?
Problem 1
Var rate;
Var hours;
If (hours >= 40)
Print ((rate * 40) + rate);
Else
Print (rate * 40);
What is the answer?
1. If rate = 850
Hours = 40
Answer =
2. If rate = 850
Hours = 20
Answer =
Make a program that will accept an integer and loop from 1 to that integer. Then, print all numbers from that range that are greater than 3.