WGU C960
Western Governors University
All 2 results
Sort by
-
WGU C960 Discrete Math 2, Questions and answers, 100% Accurate, VERIFIED | 153 Pages
- Exam (elaborations) • 153 pages • 2023
-
- $23.49
- + learn more
1.4.3: If-else-statement 
1) 
What is the value of abs after the following lines of code are run? 
x := 2 
If ( x > 0 ) 
abs := x 
Else abs := -x 
End-if 
2 
The condition ( x > 0 ) evaluates to true because the value of x is 2. The line abs := x is executed and the 
line abs := -x is skipped. Therefore the final value of abs is 2. 
1.4.3: If-else-statement 
2) 
What is the value of abs after the following lines of code are run? 
x := -2 
If ( x > 0 ) 
abs := xElse 
abs := -x 
End-if
-
(2024/250 WGU C960 Discrete Math 2, Questions and answers, 100% Accurate, VERIFIED.
- Exam (elaborations) • 153 pages • 2023
-
Available in package deal
-
- $11.49
- 1x sold
- + learn more
WGU C960 Discrete Math 2, Questions 
and answers, 100% Accurate, VERIFIED. 
1.4.3: If-else-statement 
1) 
What is the value of abs after the following lines of code are run? 
x := 2 
If ( x > 0 ) 
abs := x 
Else abs := -x 
End-if 
2 
The condition ( x > 0 ) evaluates to true because the value of x is 2. The line abs := x is executed and the 
line abs := -x is skipped. Therefore the final value of abs is 2. 
1.4.3: If-else-statement 
2) 
What is the value of abs after the fo...
As you read this, a fellow student has made another $4.70
How did he do that? By selling his study resources on Stuvia. Try it yourself! Discover all about earning on Stuvia