Given the code fragment: Which option can replace xxx to enable the code to print 135?
A.
int e = 0; e < = 4; e++
B.
int e = 0; e < 5; e + = 2
C.
int e = 1; e < = 5; e + = 1
D.
int e = 1; e < 5; e+ =2
Given the code fragment: Which option can replace xxx to enable the code to print 135?
A.
int e = 0; e < = 4; e++
B.
int e = 0; e < 5; e + = 2
C.
int e = 1; e < = 5; e + = 1
D.
int e = 1; e < 5; e+ =2
B
Correct Answer is B with the change: ( remove space + = to +=)
Right answer is B
B
Answer: B
// A int e = 0; e < 4; e++ – 1234
// B int e = 0; e < 5; e += 2 – 135 – OK
// C int e = 1; e <= 5; e += 1 – error
// D int e = 1; e < 5; e += 2 – 24
b
Answer: B
Answer: B