Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n, passed, i, number;
- printf("How many students?\n");
- scanf("%d", &n);
- passed = 0;
- for(i = 1; i <= n; i++)
- {
- printf("Enter marks of student %d: ", i);
- scanf("%d", &number);
- if(number > 33)
- passed++;
- }
- printf("%d students passed among %d\n", passed, n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement