package Mobile.OperatorsAndExpressions;
import java.util.Scanner;
public class ModulusOperator
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int a,b,y;
double c,d,z;
System.out.println("Enter First integer Number");
a=sc.nextInt();
System.out.println("Enter Second integer Number");
b=sc.nextInt();
y=a%b;
System.out.println("Remainder="+y);
System.out.println("Enter First float Number");
c=sc.nextDouble();
System.out.println("Enter Second float Number");
d=sc.nextDouble();
z=c%d;
System.out.println("Remainder="+z);
}
}
import java.util.Scanner;
public class ModulusOperator
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int a,b,y;
double c,d,z;
System.out.println("Enter First integer Number");
a=sc.nextInt();
System.out.println("Enter Second integer Number");
b=sc.nextInt();
y=a%b;
System.out.println("Remainder="+y);
System.out.println("Enter First float Number");
c=sc.nextDouble();
System.out.println("Enter Second float Number");
d=sc.nextDouble();
z=c%d;
System.out.println("Remainder="+z);
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.