5 Answers
New AnswerWell I can't make 0/0 = (whatever it might be), it is undefined and will stay that way. What are you trying to make though?
import java.io.DataInputStream; class Bitwise667 { public static void main(String as[]) { int a=0; int b=0; DataInputStream in=new DataInputStream(System.in); try { System.out.println("enter value for a"); a=Integer.parseInt(in.readLine()); System.out.println("enter value for b"); b=Integer.parseInt(in.readLine()); } catch(Exception e) {} System.out.println("a="+a); System.out.println("b="+b); System.out.println("a&b="+(a&b)); System.out.println("a/b="+(a/b)); System.out.println("a^b="+(a^b)); } }
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message