module sr_latch_nor (
input S,
input R,
output Q,
output Qn
);
// Write your code here
reg Q1,Qn2;
always @* begin
if(S && R) begin
Q1=1'b0;
Qn2=1'b1;
end
else if(S && !R) begin
Q1=1'b1;
Qn2=1'b0;
end
else if(!S && R) begin
Q1=1'b0;
Qn2=1'b1;
end
end
assign Q=Q1;
assign Qn=Qn2;
endmodule