Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started