• + 0 comments

    php solution:

    function countApplesAndOranges(t, b, oranges) { orange_count = 0;

    foreach (`$apples as $`key => $value) {
        `$sum = $`a + $value;
        if( `$sum >= $`s && `$sum <= $`t ){
            $apple_count++;
        }
    }
    
    foreach (`$oranges as $`key => $value) {
        `$sum = $`b + $value;
        if( `$sum >= $`s && `$sum <= $`t ){
            $orange_count++;
        }
    }
    
    echo `$apple_count."\n".$`orange_count;
    

    }