Question: What is Pseudocode? Before coding a program, a programmer must understand how he/she will solve the problem given. The following questions should be considered: What
What is Pseudocode? Before coding a program, a programmer must understand how he/she will solve the problem given. The following questions should be considered: What data is needed? What is the desired result? Any calculations needed? How will the result be obtained? What output does the user need/want? The steps needed to obtain the desired result are called an algorithm. It is good programming practice (and can save you a lot of headaches) to describe these steps in an simple, understandable way. With pseudocode you can describe an algorithm with short English phrases. Here's an example: Compute the area of a rectangle. The pseudocode might look like this: Get the length and width. Prompt the user for the values. Calculate the area by multiplying the length times the width Display the area. Here's another example: Compute the average of three numbers. Then the pseudocode might look like this: Prompt the user for three numbers. Calculate the average by adding the three numbers and dividing the sum by 3. Display the average. Ideally, the programmer would then take the pseudocode and write corresponding Java statements to accomplish each step
.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
