Pseudocode is an informal language to describe an algorithm for a programmer. It
ID: 3864254 • Letter: P
Question
Pseudocode is an informal language to describe an algorithm for a programmer. It describes each step that will need to be completed in order to obtain a proper result. The most important part is to make it easy to follow so that a programmer can easily translate it into whichever programming language they are using. For example, an algorithm to determine if a number is less than 2 can be written as: Input x If x<2 Print “True” Else, Print “False” There are many styles and many ways of writing pseudocode. Write a pseudocode for translating a number into a specified base. You will need two inputs, the original number in base 10 and the base you would like to convert into. In the Properties of the Integers section, the text shows its own version of the pseudocode. Write yours in your own style and try to make it easier to follow than the textbook.
please an orignal answer, thankyou very much.
Explanation / Answer
Pseudocode:
input num;
input base;
x=0;
while(num!=0)
{ rem=num%base;
num=num/base;
d[x]=rem;
x++;
}
while digits of the array is not zero
{Print "d[i];
i++;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.