Welcome Guest | Sign in | Register
Loops - Discussion Page For Q.10431 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Loops > Questions and Answers

Q: The statement which sums all values between 10 and 100 into a variable called total is, assuming that total has NOT been initialised to zero.
A. Statement 1
for( a = 10; a <= 100; a = a + 1)
total = total + a;
B. Statement 2
for( a = 10; a < 100; a = a + 1, total = 0)
total = total + a;
C. Statement 3
for( a = 10; a <= 100, total = 0; a = a + 1)
total = total + a;
D. Statement 4
for( a = 10, total = 0; a <= 100; a = a + 1)
total = total + a;

Answer and Explanation

Answer:Statement 4
for( a = 10, total = 0; a <= 100; a = a + 1)
total = total + a;

Explanation:
There is no explanation...

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.