//https://csprograms4u.blogspot.com/
//Chapter
1
//Program
2
//Modulus
Operator
import
java.util.Scanner;
public
class MO
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int x,y,z;
float a,b,c;
//Calculation of Integer Remainder
System.out.println("Enter any two integer
values");
x=sc.nextInt();
y=sc.nextInt();
z=x%y;
System.out.println("Remainder="+z);
//Calculation of decimal remainder
System.out.println("Enter any two decimal
values");
a=sc.nextFloat();
b=sc.nextFloat();
c=a%b;
System.out.println("Remainder="+c);
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.