Full Question
1. Correct the following code and
2. Convert the do while loop the following code to a while loop
declare integer product
declare integer number
product = 0
do while product < 100
display ""Type your number""
input number
product = number * 10
loop
display product
End While
Answer:
1. Code Correction
The errors in the code segment are:
a. The use of do while on line 4
You either use do or while product < 100
b. The use of double "" as open and end quotes for the string literal on line 5
c. The use of "loop" statement on line 7
The correction of the code segment is as follows:
declare integer product
declare integer number
product = 0
while product < 100
display "Type your number"
input number
product = number * 10
display product
End While
2. The same code segment using a do-while statement
declare integer product
declare integer number
product = 0
Do
display "Type your number"
input number
product = number * 10
display product
while product < 100
The roads have pre-described lanes that should follow a particular speed and rules. When a driver drives slowly than he makes the other drivers impatient.
<h3>What are traffic rules?</h3>
Traffic rules are the regulations that are defined to regulate the vehicles and other conveyances that walk on the road. They are different in various places and have separate punishments for not following them.
The left lane of the road is generally for the drivers who want to pass by the vehicle ahead by following the mph rule. If the driver drives slowly then they make the other people impatient and result in honking.
Therefore, the driver driving slowly in the left lane makes others impatient.
Learn more about traffic rules here:
brainly.com/question/6034089
#SPJ2
Answer:
The solution is attached below:
Explanation: