
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
النسخة 7الرقم المعياري الدولي: 1285225562
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
النسخة 7الرقم المعياري الدولي: 1285225562What is output by each of the pseudocode segments in Figure 5-25?
.
الخطوة 1 من7
a.
Consider the pseudocode segment given in the question.
The output produced by the pseudocode segment is as follows:
Explanation:
• The variable “a” is initialized to 1, “b” is initialized to 2 and “c” is initialized to 3.
• The while loop runs till the value of “a” is less than the value of “c”.
o The value of “a” is incremented by 1.
o The value of “b” is incremented by c i.e. every time “b” is incremented by 5.
• After the while loop, the pseudocode segment displays the value of “a” as 5, “b” as 25 and “c” as 5.
الخطوة 2 من 7
الخطوة 3 من 7
الخطوة 4 من 7
الخطوة 5 من 7
الخطوة 6 من 7
الخطوة 7 من 7
لماذا لم يعجبك هذا التمرين؟
أخرى