Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int mark, num = 1, student = 1;
- int moreThanFive = 0;
- while (student <= 30) {
- cout << "Enter " << num << " student mark : " ;
- cin >> mark;
- num++;
- student++;
- if (mark >= 5) {
- moreThanFive = moreThanFive + 1;
- }
- }
- cout << "\nThe total of student that have mark greater than 5 is " << moreThanFive << endl;
- }
Add Comment
Please, Sign In to add comment