A normal resting heart rate for an adult usually ranges from 60 to 100 beats a minute. Generally, a lower heart rate at rest implies more efficient heart function and better cardiovascular fitness.
Write a program that displays “Heart rate is normal” if the heart rate variable a user enters is within the “normal” range. If the heart rate is outside this range, then display “Heart rate is abnormal.”
- Initialize heart rate =0,
- If heart rate >=60 and heart rate =<100 then
- Heart rate is abnormal
- Heart rate is normal
To test more than one condition, you can nest a decision structure inside another decision structure.
Write a program in pseudocode that will allow the user to enter their annual income and then display the tax percentage for that income level.
|$5000 – 10,000||2%|
|$10,001 – 15,000||5%|
|$15,001 – 20,000||7%|
Your document must include:
Pseudo code for the entire program.
- Initialize income,
- Initialize tax rate,
- ‘please enter your income’
- Display income
- If income <=500 then
- Tax rate=0%
- Ifelse income >500 and <= 1000 then
- Tax rate=2% ifelse
- Income>10000 and <=15000 then
- Tax rate=5 % else
- Tax rate= 7%
Based on the scenario you selected in the Module 01 Course Project, you should expand on your documentation by adding If-Then-Else or at least 1 series of conditions to your program. Your documentation of this addition should include the following:
Internal documentation, using block and/or line comments.
You must declare all variables before using them in your pseudo code.
Your pseudo code must illustrate all calculations.
Your flowchart must depict each step in the program.
Your flowchart must use 3 types of symbols: ovals (start and end terminal symbols), parallelograms (input and output symbols), and rectangles (processing symbols).
All symbols must be connected by arrows that represent the flow of the program. The flow must make logical sense.
Place an Order