What is wrong with the following code?

int total, number;
int counter = 0;
while (counter < 10)
{
cin >> number;
total = total + number;
counter = counter + 1;
}

total must be initialized to 0.

Computer Science & Information Technology

You might also like to view...

While in Layout view, text box controls cannot be arranged as a group.

a. true b. false

Computer Science & Information Technology

You have a Class B network and need 29 subnets. What is your mask?

A) /30 B) /25 C) /24 D) /21

Computer Science & Information Technology