1. (GROUP: Nur Syahidatul Amin Bt Zain Azlan)Write an algorithm (pseudocode or flowchart) for a program that read 10 integers. Find the maximum and minimum number among the 10 (hint: use selection statements together with looping statements).
2. (GROUP: Nur Amirah Mohd Kamar)A Book Publisher offers discount to customers on the basis of customer type and number of copies ordered as shown below:
Customer number, name, type, book number, number of copies ordered and unit price are given as input. Draw a flowchart to calculate the net amount of the bill for each customer and print it.
2. (GROUP: Nur Amirah Mohd Kamar)A Book Publisher offers discount to customers on the basis of customer type and number of copies ordered as shown below:
Customer Type
|
Number of Copies Ordered
|
% of Discount
|
Book Seller
|
More than 10
|
25
|
Less than or equal to 10
|
15
| |
Library
|
More than 5
|
20
|
Less than or equal to 5
| 10 |
Customer number, name, type, book number, number of copies ordered and unit price are given as input. Draw a flowchart to calculate the net amount of the bill for each customer and print it.
3. (GROUP: Nur Hidayatul Hanis Zulkifli)(Counting positive and negative numbers and computing the average of numbers) Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values. Your program ends with the input 0. Display the average as a floating-point number. (For example, if you entered 1, 2, and 0, the average should be 1.5.)
4. (GROUP: Kavin Mithran A/L Sivanesan)Write a program that prompts the user to enter the investment amount (e.g., 1000) and the interest rate (e.g., 9%), and print a table that displays future value for the years from 1 to 30, as shown below:
The amount invested: 1000
Annual interest rate: 9%
Years Future
Value
1 1093.8
2 1196.41
...
29 13467.25
30 14730.57
5. (GROUP: Wan Nur Atira Bt Wan Abdul Faris)(Summing a series) Write a program to sum the following series:
6. (GROUP BCNS) A nested loop is a loop within a loop, an inner loop within the body of an outer one. How this works is that the first pass of the outer looptriggers the inner loop, which executes to completion. Then the second pass of the outer loop triggers the inner loop again.
Looping i and Looping J (separately) |
Looping is outer while Looping J is inner |
7. (GROUP : Muhamad Razif Hafifi). What does the following flowchart do?
No comments:
Post a Comment