How will the program know when you're done entering numbers? Put it this way, if I were putting the numbers in your program, how would I know when to stop?
int main()
{
///number of lesson
int n;
scanf_s("%d", &n);
///number of student
int m;
scanf_s("%d", &m);
/// Lessons details
for (int i = 0; i < n; i++) {
scanf_s("%19s", st[i].l[i].name_lesson);
scanf_s("%d", &st[i].l[i].number_lesson);
}
for (size_t i = 0; i < n; i++)
{
printf_s("%s - %d\n", st[i].l[i].name_lesson, st[i].l[i].number_lesson);
}
return 0;
}