Hi guys . I'm new here and I'm kinda new to programing . I'm trying to complete the task from the book , I done something so far , but I ran into a problem. How to I sum int ? I mean , I know the int+int=? , but this is something different . I need to calculate average girls and boy height. I can't use like u1,u2..,un , it's a pain in the ass . Is there a way to do this ? Can someone help me with this ? ps.sorry for my english (its not my native language).
Break it down into baby steps. Tell the user what input you want, get each input, store each input separately, then calculate the result. You need someplace to store the data for each student (ideally an array but I don't know if you know about them yet).
You need someplace to store the data for each student (ideally an array but I don't know if you know about them yet).
No, you don't.
You need to know the number of male students, the number of female students, the total height of all male students and the total height of all female students. There is no reason to store individual measurements.