Limited access

Upgrade to access all content for this subject

Assume the following declaration:

 int num1 = 5;
 int num2 = 9;
 double answer;
 double count = 2.5;
 count = count/num1;
 num1 = (int)(count + num2/count);
 answer = num1 + num2 + count;

What is the value of answer?

A

27.5

B

17.5

C

27

D

31.4

E

type mismatch, can not cast a double to an int

Select an assignment template