Friends
How do I implement following complex logic?
flag1 can be "N" or "A" or "I"
flag2 can be "N" or "A" or "I"
flag3 can be "N" or "A" or "I"
function (string flag1, string flag2, string flag3) begin
The function needs to return:
return "None" if flag1, flag2 and flag3 are "N"
else return "Active" if flag1, flag2 and flag3 are "A"
else return "Inactive" if flag1, flag2 and flag3 are "I"
else return "both" if flag1, flag2 and flag3 are either "A" AND "I" (OR "N")
e.g. 1) flag1 is "A" and flag2 is "I" and flag3 is "I"
e.g. 2) flag1 is "I" and flag2 is "A" and flag3 is "I"
e.g. 2) flag1 is "A" and flag2 is "N" and flag3 is "I"
retrun result
end
Thanks for reply but none of post gives answer. I know if else constrauct and looking for logic to implement above psedocode. All four are possibel conditions specially #4 is complex and need to know how to implement that.