UnUser Posted October 22, 2012 Report Share Posted October 22, 2012 Ce cacat nu e bine ? http://postimage.org/image/7t0wr8edb/ Quote Link to comment Share on other sites More sharing options...
filatdegarda Posted October 22, 2012 Report Share Posted October 22, 2012 if (a>{ if (a>c) max=a;else max=c;}else{if (b>c) max=b;else max=c;} Quote Link to comment Share on other sites More sharing options...
B7ackAnge7z Posted October 22, 2012 Report Share Posted October 22, 2012 Îmi cer scuze pentru offtopic, dar trebuie s? v? prezint ?i aceast? func?ie scris? în PHP:/** * Find the sum of 2 natural numbers * * @version 1.0 beta * @author CERN * @license Use at your own risk * * @param int $x * @param int $y * @return int*/function sum($x, $y){ if($x == 0) return $y; if($y == 0) return $x; $sx = sum($x, $y - 1); $sy = sum($x - 1, $y); return ($sx + $sy) / 2 + 1;} Quote Link to comment Share on other sites More sharing options...
totti93 Posted October 22, 2012 Report Share Posted October 22, 2012 One line (sunt cam obosit, sper ca nu m-am incurcat pe undeva):int max = a > b ? a > c ? a : c : b > c ? b : c;int min = a < b ? a < c ? a : c : b < c ? b : c; Quote Link to comment Share on other sites More sharing options...
banks Posted October 23, 2012 Report Share Posted October 23, 2012 Ia mai bine codeblocks.. e un mare cacat borland c++ Quote Link to comment Share on other sites More sharing options...