Курсовая работа: Работа с языками С и С++
k=k->next;
k->pre=q;
}
for (; y! ='Y'; n++) {
while (cin. get ()! ='\n')
continue;
cout<<"Введите год БП №"<<n+1<<endl;
for (i=0;; i++) {
k->year [i] =cin. get ();
if (k->year [i] =='\n') {
k->year [i] ='\0';
break;
}
if (k->year [i] <48 || k->year [i] >57 || i>3) {
k->year [i] ='\0';
while (cin. get ()! ='\n')
continue;
break;
}
}
cout<<"Введите название БП №"<<n+1<<endl;
for (i=0;; i++) {
k->name [i] =cin. get ();
if (k->name [i] =='\n') {
k->name [i] ='\0';
break;
}
if (k->name [i] <31 || k->name [i] >126 || i>38) {
k->name [i] ='\0';