Write An Algorithm in The Form of Pseudocode and Draw A Flowchart To
Write An Algorithm in The Form of Pseudocode and Draw A Flowchart To
flowchart to
1. Input a number and print if is a positive number or not.
2. Input the day of a week and print holiday if it is Saturday.
3. Input a number and print if it is odd or even.
4. Input the day of a week and print holiday or working day.
5. Input any number and check whether the given no. is divisible by 5 or not.
6. Input any number and check whether the given no. is divisible by 3 and 7 or not.
7. Input any number and check whether the given no. is positive, negative or zero.
8. Input the sides of a triangle and decide if it is right angled, obtuse angled or acute angled.
9. Input any three numbers and display the greatest one.
10. A company has 5000 CDs, DVDs, videos and books in stock. Each item has a unique 5- digit code with the
first digit identifying the type of the item, ie,
1 = CD 2= DVD 3=Video 4= book
For eg., or the code 15642 the 1 identifies that it is a CD and for the code 30055, the 3 identifies that it is a
video. [MAY JUNE 2007]
11. Customers can withdraw cash from an Automated Teller Machine (ATM).
Withdrawal is refused if amount entered > current balance.
Withdrawal is refused if amount entered > daily limit.
If current balance < 100, then a charge of 2% is made
If current balance is 100, no charge is made.
Write an algorithm which inputs a request for a sum of money, decides if a withdrawal can be made,
calculate any charges. Appropriate output messages should be included. [MAY/JUNE 2008]
12. A small airport handles 400 flights per day from three airlines:
FASTAIR (Code FA)
SWIFTJET (Code SJ)
KNIGHTAIR (Code KA)
Each flight is identified by the airline code and 3 digits. For example, FA 156. Write an algorithm,
using pseudocode which monitors the 400 flights into and out of the airport each day. The following inputs,
processing and outputs are all part of the monitoring process:
Input flight identification
Calculate number of flights per day for each of the three airlines
Output the percentage of the total flights per day by each airline
Any validation checks must be included
13. A town contains 5000 houses each house owner must pay tax based on the value of the house. House over
200000$ pay 2% of their value in tax, houses over 100000$ pay 1.5% of value in tax and houses over 50000 $
pay 1 % of their value in tax. All others pay no tax. WAA to solve this problem in the form of a flowchart
14. WAA in the form of a flowchart which takes temperatures input over a 100-day period (once per day) and
output the number of days when the temperature was below 20`C and the number of days when the
temperature was 20`C and above.
15. WAA in the form of flowchart which input the top speeds of 5000 cars in Km/Hr, output the fastest speed and
the slowest speed and outputs the average speed of all 5000 cars.
16. A shop sells books, maps and magazines each item is identify by a unique 4-digit code. All books have a code
starting with 1, all maps have a code starting with 2 and all magazines have a code starting with 3. The code
9999 is used to end the algorithm. WAA in the form of flowchart which inputs the code for all items in the
stock and outputs the number of books, no. of maps and no. of magazines in the stock. Include any validation
checks needed.