There is no adjustment in the postgraduate reestin. 4 counts 24. My gosh
It's easy to complete it in two hours (one hour of thinking about one hour). Feeling that your Coding is still unprinted, the code is written more naive, um, need to strengthen.
Stealing a little lazy without writing.
Import java.io.ioException; class cal {string [] buf = new string [4]; int count = 0; public boolean bingo24 (Double [] Number) {if (Number.length == 1) {IF (Math. ABS (Number [0] - 24) <0.01) Return True; Else Return False;} else {for (INT i = 0; I Temp [i] = number [i] * number [j]; if (bingo24 (temp)) {buf [count ] = Number [i] "*" Number [j] "=" TEMP [i] "; / n"; return true;} if (Number [J]! = 0) {TEMP [i] = Number [i] / number [j]; if (bingo24 (temp)) {buf [count ] = Number [i] "/" Number [J] "=" TEMP [i] "; / n"; return true;}}} (Number [i]! = 0) {TEMP [i] = Number [J] / Number [I]; IF (BingO24 (Temp)) {BUF [Count ] = Number [J] "/" Number [i] "=" TEMP [i] "; / N "}}}}}}}}}}}} Public static void main (string args []) {byte [] buffer = new byte [64]; system.out.Print (" Please enter four integers, I give The budget is derived from 24, and the numbers are separated by spaces. After entering: "); try {system.in.read (buffer);} catch (ioException e) {system.err.print (e);} Double [] Number = New Double [4]; int = 0; StringBuffer Rea DNUMBERBUF = new stringbuffer (); for (int i = 0; i