Q.5 Devide two Numbers without Using *,/,% operators print quotient,Reminderpublic class DevideNum {
public static void main(String[] args) {
int a=54,b=5,c=0;
while(b<=a){
a=a-b;
c++;
}
System.out.println("Reminder"+a);
System.out.println("Quotient"+c);
}
}
No comments:
Post a Comment