Write the Output of the following program given in the attachment.
Attachments:
Prakhar2908:
what's the answer
Answers
Answered by
1
c) the output will be odd numbers
like 1,3,5,7,9
d)the numbers will be in reverse form
like 1,3,5,7,9
d)the numbers will be in reverse form
Answered by
5
Answer :
c)
1
3
5
7
9
d)
10
8
6
4
2
Explanation : While..wend is a type of looping control structure. The statement inside the loops are executed only if the conditional expression evaluates to true.
Here , the conditional expressions are :- A<=10 ; A>0
A=A+2 and A= A-2 are increment or decrement part. They are Step value. After each loop , the value of the control variable gets altered as per the stated updation statement. The wend statement shifts the loop control back to while statement.
Print statement is used to display something on the output screen.
c)
1
3
5
7
9
d)
10
8
6
4
2
Explanation : While..wend is a type of looping control structure. The statement inside the loops are executed only if the conditional expression evaluates to true.
Here , the conditional expressions are :- A<=10 ; A>0
A=A+2 and A= A-2 are increment or decrement part. They are Step value. After each loop , the value of the control variable gets altered as per the stated updation statement. The wend statement shifts the loop control back to while statement.
Print statement is used to display something on the output screen.
Similar questions
Math,
6 months ago
Physics,
6 months ago
Accountancy,
6 months ago
English,
1 year ago
Science,
1 year ago