Formula required (if possible)

I would like a formula based on the following
if possible.
Cell A1 is entered with any number from 0 through to 360.
Cell A2 is entered with any number from 0 through to 360.
Cell C1 is to return the number based on the following conditions and Cell D1 is
to return either e or w based on the conditions.

360 subtract (A1+A2) but the number in A1 is A2 minus A1 if A2 is greater than A1 and then subtract 360 if [(360 subtract(A1+A2)] is greater than or equal to 360 and this to return the numerical result in cell C1 with the letter w in cell D1, and if cell C1 is greater than or equal to 180, then 360 subtract the result in cell C1 and cell D1 to return the letter e. That's it. Thank you.

Question solved....No need

Question solved....No need for replays....Thanks.