Back to Browse

GRE Computer Science Question 19

2.2K views
Mar 29, 2012
4:30

19. Consider the following pseudocode in which all variables are integers and m 1. Pseudocode I sum = 0 for i = 1 to m sum = sum + i output ( sum ) The following pseudocode is intended to produce the same output as Pseudocode I. Pseudocode II sum = 0 i = "initial value" while ( "condition" ) { i = i + 1 sum = sum + i } output ( sum ) Which of the following can be used to replace "initial value" and "condition" so that Pseudocode II will produce the same output as Pseudocode I ? "initial value" "condition" (A) 0 i less-than m - 1 (B) 0 i less-than m (C) 0 i less-than m + 1 (D) 1 i less-than m (E) 1 i less-than m + 1

Download

0 formats

No download links available.

GRE Computer Science Question 19 | NatokHD