Take a look at the following algorithm: Input: x: real number Output: unstated procedure pl (x) If (x > 90), Return ("great!") If (x <= 90 and x > 60), Return ("ok") If (x <= 60), Return ("not ok"). I a) What is returned by the algorithm on the input 78, i.e. x = 78? b) What is returned by the algorithm on the input 99, i.e. x = 99? 1.) 10 pts
Take a look at the following algorithm: Input: n: integer Output: unstated procedure p2 (n) S := 0 While n > 8: S :n x 5 + 1 n = n - 1 End-while Return (s) a) When will the while-loop stop? b) what is returned by the algorithm on the input 10, i.e. n = 10? Show/explain your steps. 2. 15 pts
Take a look at the following algorithm: Input: x: real number Output: unstated procedure pl (x) If (x > 90), Return ("gr
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Take a look at the following algorithm: Input: x: real number Output: unstated procedure pl (x) If (x > 90), Return ("gr
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!