This
preview
has intentionally blurred sections.
Sign up to view the full version.
Unformatted text preview: a compile-time or a run-time error in the C/R column and give the source of the error in the explanation column. This exercise is tedious, but the time you spend learning about how to identify syntax errors, will save you frustration later. Program C/R Explanation B C D E F Problem 2 : For each part, state the value of a (and b ) after evaluating the code fragment. (a) int a = 10/3; (b) boolean a = true; a = !a; a = !a; a = !a; (c) double a; double b = 1.0; double c = 2.0; double d = 3.0; a = 4.0 * b * c/d * d; b = 4.0 * b * c/(d * d); Problem 3: Assuming x and y are declared to be double s. Write an expression to compute x/y 3 . Problem 4: Assume a and b are int s. Write an expression computing whether a is equal to b without using the == or != operators....
View
Full Document
- Fall '09
- AnneRogers
- Computer program, Baseball statistics, Run time, Compile time, double double double
-
Click to edit the document details