Programming Logic :
Define the IPO (Input, Processing and Outputs) for each of the following programming problems.Use variable names when you do that. SeeSee the example below.
- Highlight your variables in RED
FOR EXAMPLE:
– Adding Two Numbers
Problem Statement
Create a program that will add up a sale amount and the tax amount. The sum should be output to the screen.
Defining Diagram
INPUTS:
Define the Input VARIABLES
that you will need
PROCESSING:
Define how you will Process those
VARIABLES
The user will input the following
variables from the keyboard:
sale and
tax
Calculate
sale + tax = total
OUTPUTS:
Use the VARIABLES and
TEXT that you will
Output
“Your total purchase is ”
+total
– Inches to Centimeters Conversion
Problem Statement
A program is required to convert a number of inches into it’s equivalent in centimeters.
The number of inches is to be entered. The resulting number of centimeters should be
output to the screen.
Defining Diagram
INPUTS:
Define the Input VARIABLES
that you will need
PROCESSING:
Define how you will Process those
variables
OUTPUTS:
Use the Variables that
you will Output
Inch
Centi
– Calculate Income Tax
Problem Statement
A program is required to determine to calculate the amount of Virginia State Income tax a person will pay. The user will
enter their annual income. The Virginia income tax rate is 5.75%. Display the amount of tax they need to pay.
Defining Diagram
INPUTS:
Define the Input VARIABLES
that you will need
PROCESSING:
Define how you will Process those
variables
OUTPUTS:
Use the Variables that
you will Output
– Determine Average Electric Bill Cost
Problem Statement
A program is required to determine the average cost of a person’s electric bill over a 3 month period. The average amount
should be output to the screen.
Defining Diagram
INPUTS:
PROCESSING:
OUTPUTS:
Define the Input VARIABLES
Define how you will Process those
Use the Variables that
that you will need
variables
you will Output
– Determine Letter Grade
Problem Statement
A program is required to convert a number grade to a letter grade. The user will enter the number
grade for an assignment at the keyboard. The valid numeric grades will range from 0 to 100. The
grading scale that is used will be a tradition 10 point grading scale (90 – 100 is A, 80 – 89 is B, 70 –
79 is C, 60 – 69 is D, and 0 – 59 is F). For any valid numeric grade, the program should print out both
the numeric grade and also the equivalent letter grade. For any invalid numeric grade the program
should print out an error message including the numeric grade.
Defining Diagram
INPUTS:
Define the Input VARIABLES
that you will need
PROCESSING:
Define how you will Process those
variables
OUTPUTS:
Use the Variables that
you will Output