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); } } output
Answers
Shall be the output.
Answer:
Here is required answer.
Explanation:
As ask in question ,
What will be the output of the following Java program?
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);
}
}
Output
Modulus operator returns the remainder of a division operation on the operand. a = a % 10 returns 25.64 % 10
i:e 5.640000000000001. Similarly b = b % 10 returns 5.
Modulo Operator is one of the fundamental operators in Java. It's a binary operator i.e. it requires two operands. In a division operation, the remainder is returned by using the modulo operator. It is denoted by the % (percentage) sign.
Modulo operator is also known as Remainder operator and denoted by percentage sign (%). It's one of the most basic operators and very useful to create logic in programming, available in almost every single programming language
For more :
https://brainly.in/question/37690288
#SPJ2