A big thing for me was going to office hours or just talking to them here and there after class or through email. Whether it be to discuss how you should go about an assignment, to review subject matter, or just to introduce yourself, they'll acknowledge that you're going the extra distance to do well in their class and that you are dedicated. Also, if possible, if any of them have research labs offering to lend a hand was a big help for me. I started as a volunteer in my professor's lab and ended up being hired as her assistant. Just getting to know your profs is super helpful! Talk to them and do well in their class and they'll be more than happy to write you a letter.