Simple C question

Associate
Joined
18 Jul 2004
Posts
1,866
Im currently writing a c program for some coursework, but ive encountered a bit of an issue. Ive tried to explain it below:


if tmode = 1 and cp<cpmin
do code a
if tmode = 2 and coef<coefmin
do code a
else
do code b

So basically, id like two if statements, that both refer to the same piece of code (code a), but without having to repeat code a twice?
 
Back
Top Bottom