subject

Analyze the following fragment: double sum = 0;
double d = 0;
while (d != 10.0) {
d += 0.1;
sum += sum + d;
}
A. The program does not compile because sum and d are declared double, but assigned with integer value 0.
B. The program never stops because d is always 0.1 inside the loop.
C. The program may not stop because of the phenomenon referred to as numerical inaccuracy for operating with floating-point numbers.
D. After the loop, sum is 0 + 0.1 + 0.2 + 0.3 + ... + 1.9

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
On the loan worksheet in cell c9 enter pmt function to calculate the monthly payment for the altamonte springs 2018 facilities loan. ensure that the function returns a positive value and set the reference to cells b5 and b6 as absolute references.
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 15:50
Subscribe to j p g a m e t u b e on you tube ?
Answers: 2
question
Computers and Technology, 24.06.2019 22:10
Function name: poly parameters: int returns: int description: a polynomial of degree n with coefficients a0,a1,a2,a3, . . ,an is the function p(x) = a0+a1x+a2x2+a3 ∗ x3+ . . +an ∗ xn this function can be evaluated at different values of x. for example, if: p(x) = 1+2x+ x2, then p(2) = 1+2 ∗ 2+22 = 9. if p(x) = 1+x2+x4, then p(2) = 21 and p(3) = 91. write a function poly() that takes as input a list of coefficients a0, a1, a2, a3, . . , an of a polynomial p(x) and a value x. the function will return poly(x), which is the value of the polynomial when evaluated at x.
Answers: 3
You know the right answer?
Analyze the following fragment: double sum = 0;
double d = 0;
while (d != 10.0) {
...
Questions
question
Mathematics, 19.08.2019 09:10
question
Chemistry, 19.08.2019 09:10
question
Physics, 19.08.2019 09:10
question
Mathematics, 19.08.2019 09:10
Questions on the website: 13722367