Задача със случайно генерирани оценки на студенти
Имам два въпроса:
Как да изведа брой отличници и студенти със слаб успех?
Как да изкарам средния успех на групата?
#include<math.h>//matematicheski funkcii
#include <iostream>//vhodno izhodni potoci
#include <windows.h>//za system
#include <fstream> //za zapis i chetene na fail
using namespace std;
int main()
{
    int students;
    int ocenki;
    int tochki;
    char ime[30];
    SetConsoleOutputCP(1251);
    SetConsoleCP(1251);
int oc2=2;
int oc3=3;
int oc4=4;
int oc5=5;
int oc6=6;
    char otnovo = 'd';
    while (otnovo == 'Д' || otnovo == 'д' || otnovo == 'D' || otnovo == 'd')
    {
        do {
            cout << endl << "Моля, въведете брой студенти в групата - от 10 до 16:    ";//
            cin >> students;
        } while (students < 10 || students >16);
        for (int i = 1; i < students; i++)
        {
cout << endl << "Студент номер: " << i << endl << endl;
            for (int i = 0; i < 1; i++)
            {
                tochki = rand() % (100 - 30 + 1) + 30;
                cout << endl << "Точки:  " << tochki;
}
            if
                (tochki <= 49)
            {
                cout <<endl<< "Слаб : "<<oc2;
            }
            else
                if
                    (tochki <= 59)
                {
                    cout << endl << "Среден: "<<oc3;
                }
                else if
                    (tochki <= 75)
                {
                    cout << endl << "Добър: "<<oc4;
                }
                else if
                    (tochki <= 89)
                {
                    cout << endl << "Много добър: "<<oc5;
                }
                else if
                    (tochki <= 100)
                {
                    cout << endl << "Отличен: "<<oc6;
                }
                else
                {
                    cout << "Натиснете клавиш.";
}
}
        cout << endl << endl << "Искате ли да започнете отново?   Д/Н " << endl << endl;
        cin >> otnovo;
    }
    
    return(0);
Благодаря за насоките :)