Which of the following code displays the area of a circle if the radius is positive.

a. if (radius != 0) System.out.println(radius * radius * 3.14159);
b. if (radius >= 0) System.out.println(radius * radius * 3.14159);
c. if (radius > 0) System.out.println(radius * radius * 3.14159);
d. if (radius <= 0) System.out.println(radius * radius * 3.14159);


c Positive means > 0.

Computer Science & Information Technology

You might also like to view...

Assume that, in addition to the operations read(x) and write(x), a database has the operation increment(x,C), which (atomically) increments the value stored in record x by the constant C, which might be positive or negative. Design a conflict table for these operations for use in an immediate-update pessimistic concurrency control.

What will be an ideal response?

Computer Science & Information Technology

The Advanced Encryption Standard was published by the __________ in 2001.

A. ARK B. FIPS C. IEEE D. NIST

Computer Science & Information Technology

Using named ranges to identify source data for list validation makes worksheets easier to interpret

Indicate whether the statement is true or false

Computer Science & Information Technology

Hacking into phone systems is called ___________

a. Telnetting b. Dial hacking c. Phreaking d. None of the above

Computer Science & Information Technology