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/alvasalrey Aug 16 '17
hi bruce i have this code as an example , i translated it to english so that you can understand it https://pastebin.com/XybY2y1C
i dont understand why we use the number of students (nstudents) as the counter instead of the grades, i dont seem to be able to translate the written problem into variables for my code , its a stupid mental block thats really holding me back and im wondering how you and others worked through it , and if there are more excercises (or other resources) you can suggest to help me along
thanks for taking the time to respond , its really apreciated