Documente Academic
Documente Profesional
Documente Cultură
For each of the following problems, design the solution using pseudocode and flowcharts:
1. You are to design an algorithm that will receive an integer from the screen, add 5 to it,
double it, subtract 7 from it, and display the final number to the screen.
2. A home mortgage authority requires a deposit on a home loan according to the following
schedule:
Loans in excess of $100,000 are not allowed. Design a program, which will read a loan
amount and compute and print the required deposit. The program should terminate when an
invalid loan amount is entered by the user.
Sample input-output:
Enter loan amount (Key in –999 to end) : 10000
The deposit is : $500.00
3. Design in pseudocode or flowchart an interactive program that reads a low value, a high
value, and an increment value, ensures that the low value is less than or equal to the high
value, and computes and prints a table of square and cube values from low to high at
increments of increment.
Sample input-output :
Low value : 1
High value : 5
Increment : 1
5. Design a program that will read a series of integers from the user and store them in an array
called num[]. The program should then calculate and display the product of all integers
entered by the user.
Sample input-output :
Enter total numbers to read : 5
Key in 5 numbers :
365 47
6. Design an algorithm that will read an array of 200 characters and display to the screen a
count of the occurrences of each of the five vowels (a, e, i, o, u) in the array.