- Jun 22, 2001
- 1,638
- 3
- 81
I have a variable of type double. I also have an array of type double that's been initialized. I traverse the array until I find the value that equals the double variable. Somehow the loop will not stop even though I have found the index in the array that contains the value equal that of the variable.
When the program is ran, the value of double variable "displacement" is displayed. The program starts going through the double array. "k" is the index while "bin" represents the value that k points to in the array.
When "k" = 51, "bin" == "displacement." The loop should stop but it doesn't. Why?
File
When the program is ran, the value of double variable "displacement" is displayed. The program starts going through the double array. "k" is the index while "bin" represents the value that k points to in the array.
When "k" = 51, "bin" == "displacement." The loop should stop but it doesn't. Why?
File