r/C_Homework • u/alvasalrey • Aug 14 '17
Help with 'for'
Hello everyone I'm pretty new to this sub and I've only been lurking around since I started taking an intro to programming class (mostly based in C) , anyways I was wondering if you guys know any good sites or resources (hopefully with exercises) that explains the use of for , I understand how it works and where the numbers go in the "equation" to make it work I'm just having a hell of a time translating a problem or excersice into code and plugging in those numbers
Please let me know if I should explain the problem further , English is not my first language so I don't know if I made a good job at explaining
Thanks everyone
View all comments
Show parent comment
1
u/kiipa Aug 21 '17
Late answer, but, you use the number of students because you want to ask for each students grade.
In English: for every student, do [code inside the loop].
We don't know how many grades there are, because we ask that later. But we know how many students there are, and we want to know each student's grade.