Write the pseudo-code of Q1 using C++ language supposing  that you have the following variables and functions already defined: A1: the distance from target A2: the angle to target MOVEFORWARD: to move forward TURN(VAL): to turn right or left. If the parameter is positive it turns to the right, else to the left

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter7: String Manipulation
Section: Chapter Questions
Problem 7E
icon
Related questions
Question

Q2

Write the pseudo-code of Q1 using C++ language supposing  that you have the following variables and functions already defined:

  1. A1: the distance from target
  2. A2: the angle to target
  3. MOVEFORWARD: to move forward
  4. TURN(VAL): to turn right or left. If the parameter is positive it turns to the right, else to the left.
Q1
Draw the flowchart representing the following pseudo-code.
Repeat
Read distance from target
Read angle to target
if distance from target larger than 40
if angle to target is larger than 0
else
End
if angle to target is less than 20
Tum Right(50)
Tum Right(100)
if angle to target is larger than -20
Tum Left(50)
Tum Left(100)
else
else
Move Forward
Transcribed Image Text:Q1 Draw the flowchart representing the following pseudo-code. Repeat Read distance from target Read angle to target if distance from target larger than 40 if angle to target is larger than 0 else End if angle to target is less than 20 Tum Right(50) Tum Right(100) if angle to target is larger than -20 Tum Left(50) Tum Left(100) else else Move Forward
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning