So I'm trying to write out a logical expression and a truth table for the function: if s then p else q.
The problem I'm having is I don't know how to represent that function in logic. I mean I know in most programming languages the code would look something like this ---> if s ? p : q. In other words if s output p otherwise output q. But how would that look in logic? I tried to come up with a truth table first but I'm not sure how to do that without the logical expression.
Thanks in advance!