God tells Cain that if he did what is right, he would be accepted. therefore Cain did what was wrong. God did not give Cain further instructions on what is right, therefore Cain already knew what was right, and did wrong anyway. therefore Cain sinned with his offering.
therefore God showed Cain...