A

Admin • 828.03K Points
Coach

Q. What will be the output of the following Java program?

Code:
class Modulus
{
public static void main(String args[])
{
double a = 25.64;
int b = 25;
a = a % 10;
b = b % 10;
System.out.println(a + " " + b);
}
}
  • (A) 5.640000000000001 5
  • (B) 5.640000000000001 5.0
  • (C) 5 5
  • (D) 5 5.640000000000001
  • Correct Answer - Option(A)
  • Views: 14
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.