Write a program to read 50 students’ marks, calculate and print the number of students who succeed and the number of students who failed (any marks below 40 should be considered failed).

You'll need to do better than just cut and pasting your homework assignment if you want help from DaniWeb members I'm afraid. Show us the code you have so far and explain where you are getting stuck, then someone might be able to point you in the right direction. Nobody is just going to do your stuff for you, sorry.

Please post the code you have tried

@johh_165. I've seen folk just dump their code without telling where the error is. When I have an issue I narrow it down to the line that is giving me trouble then I examine the variables for that line and think over how that line works. For me that's how I work most of the errors I encounter.

Dumping your project and asking for a fix may get you no answers.

commented: you're right +2

Seems like you at least failed for lack of even bothering to try.