Page 1 of 1

Take a look at the following algorithm: Input: x: real number Output: unstated procedure pl (x) If (x > 90), Return ("gr

Posted: Thu May 05, 2022 1:59 pm
by answerhappygod
Take A Look At The Following Algorithm Input X Real Number Output Unstated Procedure Pl X If X 90 Return Gr 1
Take A Look At The Following Algorithm Input X Real Number Output Unstated Procedure Pl X If X 90 Return Gr 1 (33.82 KiB) Viewed 30 times
Take A Look At The Following Algorithm Input X Real Number Output Unstated Procedure Pl X If X 90 Return Gr 2
Take A Look At The Following Algorithm Input X Real Number Output Unstated Procedure Pl X If X 90 Return Gr 2 (29.74 KiB) Viewed 30 times
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