The task is as follows. It is necessary with the help of the structure to enter the name of the students, year of birth, year of entering the university and assessment of exams. Bring out students whose last name begins with the letter A and their grades.
#include <stdio.h> #include <string.h> #include <conio.h> struct famA { char fio[100]; int yearbirth, yearpost; int matan, rus, op; } round[3]; int main() { int i; puts("Vvedite dannye o studentah"); for (i = 0; i < 3; i++) { puts("FIO: "); gets(round[i].fio); printf("\nYear of birth: "); scanf_s("%i", &round[i].yearbirth); printf("\nYear of post: "); scanf_s("%i", &round[i].yearpost); printf("\nGrade matan: "); scanf_s("%i", &round[i].matan); printf("\nGrade rus: "); scanf_s("%i", &round[i].rus); printf("\nGrade OP: "); scanf_s("%i", &round[i].op); } //ввод данных о студентах for (i = 0; i < 3; i++) { if (round[i].fio[0] == 'A') { puts(round[i].fio); printf("\nmatan = %i \nrus = %i OP = %i", round[i].fio, round[i].matan, round[i].rus, round[i].op); } } _getch(); } Everything is OK with me, except for one thing - the full name can be entered only once (the first one), and then he writes "FIO:", but does not give input, switches right to the year of birth. 
Wednesday VS 2015.
getsreplaced with an honestscanf_s? - VladD