Computer Science, asked by shreyaku, 6 months ago

2. Determine the data type of the expression
100 (1 - pq)
(p+r/s
(9+r) (long)(s + p)
If p is an int, r is a float, q is a long and s is double.​

Answers

Answered by koushik2215
2

Explanation:

[100(1-pq)/(q+r)] – [(p+r)/s / (long)(s+p)]

[100(1 – int*long) / (long + float)] – [(int + float)/double / (long)(double + int)]

[100(1-long) / (long)] – [(float)/double / (long)(double)]

[100(long) / (long)] – [double / long]

[long/long] – [long]

long – long

long

So, the data type of the expression is long.

Similar questions