Why 5% wrong

B20147 Akshar Singh asked 4 months ago

Scanner scn = new Scanner(; int a = scn.nextInt(); int b = scn.nextInt(); int c = a/b; int d = a%b; if(a>=0) { System.out.println(c+" "+d);} if(a<0&&b>0) { c=c-1; d=0-(cb-a); System.out.println(c+" "+d); } if(a<0&&b<0) { c=c+1; int e = 0-(cb-a); System.out.println(c+" "+e); }

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.