Write the pseudocodes/algorithm for the given questions.a. ABC bank offers 5% discount if payment is made within 10 days after notice. No discount ifthe payment is made after 10 days.b. A program receives input of an integer number. This number is then to be multiplied bynumbers from 1 to 12. The result for each multiplication is printe
Question
Write the pseudocodes/algorithm for the given questions.a. ABC bank offers 5% discount if payment is made within 10 days after notice. No discount ifthe payment is made after 10 days.b. A program receives input of an integer number. This number is then to be multiplied bynumbers from 1 to 12. The result for each multiplication is printe
Solution
Sure, here are the pseudocodes for the given questions:
a. ABC bank offers 5% discount if payment is made within 10 days after notice. No discount if the payment is made after 10 days.
Algorithm for ABC Bank Discount:
1. Start
2. Input the number of days after notice the payment is made (days)
3. If days <= 10 then
3.1 Calculate the discount as 5% of the payment amount
3.2 Subtract the discount from the payment amount to get the final amount
4. Else
4.1 The final amount is the same as the payment amount
5. Print the final amount
6. End
b. A program receives input of an integer number. This number is then to be multiplied by numbers from 1 to 12. The result for each multiplication is printed.
Algorithm for Multiplication Table:
1. Start
2. Input the integer number (num)
3. For i from 1 to 12 do
3.1 Calculate the result as num * i
3.2 Print the result
4. End
Similar Questions
Write the pseudocodes/algorithm for the given questions.a. ABC bank offers 5% discount if payment is made within 10 days after notice. No discount ifthe payment is made after 10 days.
Write a java program to perform the concept of method overriding for calculating simple interest of 3 banks A,B,C., Bank A’s rate of interest-10%, Bank’s B rate of interest-9%, Bank’C rate of interest -7%.
Single File Programming QuestionProblem StatementMeet Alex, a budget-savvy shopper who wants to give discounts to customers in the following ways:If the amount is greater than 5000 (not inclusive), the discount is 20%.If it is greater than 2000 (not inclusive), the discount is 15%.10% discount for a purchase amount greater than 1000 (not inclusive). Write a program that takes the amount as input and calculates the discounts using a function named applyDiscount. The discount rates are set as 10%, 15%, and 20% as global double datatype variables.Input format :The input consists of a double value representing the amount.Output format :The output displays "Discounted amount: " followed by a double value representing the discounted amount, rounded to two decimal places.Refer to the sample output for the formatting specifications.Code constraints :In this scenario, the test cases fall under the following constraints:1000.0 ≤ Amount ≤ 10000.0Sample test cases :Input 1 :2000.0Output 1 :Discounted amount: 1800.00Input 2 :1100.50Output 2 :Discounted amount: 990.45Input 3 :10000.0Output 3 :Discounted amount: 8000.00Input 4 :1000.0Output 4 :Discounted amount: 1000.00
What will be the output of the following pseudocode?Integer a, b, cset a= 20, b= 5for (each c from b to 7)a = a-1a= a+bend fora= a- bprint a + b
Alice is managing a budget for her monthly expenses. She receives her salary but also has to pay bills. If her salary is greater than or equal to 2000, she can cover all her bills. If her salary is less than 2000, she needs to borrow money. Additionally, if she borrows money, she needs to pay an interest of 5%.Write a program that takes Alice's salary as input, utilizes logical and ternary operators to determine whether she can cover all her bills, and calculates the total amount she needs to pay if she borrows money.Input format :The first line of input consists of a double value 'S', representing Alice's salary.Output format :The output displays whether Alice can pay or not in the following format:If she can pay then the output displays "Alice can cover all her bills."If she cannot pay the output displays the total amount to pay which has been borrowed including the interest with two decimal places.Refer to the sample output for the formatting specifications.Code constraints :In this scenario, the test cases fall under the following constraints:100 ≤ S ≤ 5000Sample test cases :Input 1 :1000.50Output 1 :1049.47Input 2 :2000.0Output 2 :Alice can cover all her bills.Input 3 :5000.0Output 3 :Alice can cover all her bills.Input 4 :100.0Output 4 :1995.00
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.