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
Yes a volcanic eruption can suddenly bury a city ! if you look up some stuff on pompeii you can learn more
Answer:
Silica is the principal component in glass.
Explanation:
Step1
Glass is the amorphous solid and transparent. Glass products have many of the shapes and design that are available in market.
Step2
Natural quartz is the primary source of glass in sand. Silica is the principal component in approximately all glass. Lime stone, soda ash and aluminum oxide are added in the galas for desired properties depending upon application. So, silica is the principal component in glass.
Answer:
Explanation:
In the development of a torsion formula for a circular shaft, the following assumptions are made: Material of the shaft is homogeneous throughout the length of the shaft. Shaft is straight and of uniform circular cross section over its length. Torsion is constant along the length of the shaft.