Question: User For this challenge, you will create a flowchart for the algorithm below. ( DO NOT USE ANOTHER ALOGORITHM ) . The algorithm is used
User
For this challenge, you will create a flowchart for the algorithm below. DO NOT USE ANOTHER ALOGORITHM
The algorithm is used as a way to convert octal values to decimal values.
Scenario:
Your program accepts as input a digit octal number. Examples:
a Each digit will be stored in a single char variable. This means you need to create char variables.
To calculate your decimal equivalent, you will do the following:
a Ask the user for a digit octal number and save the digits to variables eg octval octval octval octval
b Store the value into variable cube
c Follow the below algorithm to convert the number to decimal.
Step no Operation Description
Ask for digits If the user enters q or Q; quit the program
octval cube Multiply octval by cube and save the result to octval
cube Shift right cube by and save the result to cube
octval cube Multiply octval by cube and save the result to octval
cube Shift right cube by and save the result to cube
octval cube Multiply octval by cube and save the result to octval
cube Shift right cube by and save the result to cube
octval cube Multiply octval by cube and save the result to octval
result sumoctvalN Add all octval values and store the result in the result
Start again at step Loop back to the top, at step
N in octvalN represents any number in the set octval octval octval octval
IMPORTANT: When you enter your octal digits, you will enter each as a character.
Use the following symbols to complete the assignment:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
