Arduino sketch from truth table

Still no response to the two solutions that were posted...