steventh2427 steventh2427
  • 07-02-2024
  • Computers and Technology
contestada

What is the output of the following code fragment
int i = 1;
int sum = 0;
while (i <= 15)
{
sum = sum + i;
i++;
}
System.out.println("The value of sum is " + sum);
a) The value of sum is 0
b) The value of sum is 105
c) The value of sum is 120
d) The value of sum is 136

Respuesta :

Otras preguntas

Are all 5 sided figures similar?
If a runner covers 400 meters in 50 seconds, what is the runners average speed? What if the runner takes 60 seconds to cover the same distance?
Why are there fewer traditional economies today?
find the buying price of each of the following when 5% sales tax is added on the purchase of;1. a pillow for RS. 60 2. two bars of soap at RS.25 each
Solve this proportion 10/8=n/10
The points given in the table lie on a line.fund the slope of each line
What is the fewest number of sides a polygon can have?
why is 5/12 greater than 3/4
Is 2,-5,-12,-19,-26 an arithmetic sequence
Many inherited disorders of humans appear in children of parents who do not have the disorder. How can you explain this?