Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int MAXN = 100; // максимально возможное количество книг
- struct book{
- int number;
- char authorName[256];
- char bookName[256];
- int year;
- char publishing[256];
- int countOfPages;
- };
- book books[MAXN];
- int num;
- char authorName[256];
- char bookName[256];
- char publishing[256];
- int countOfPages;
- int year;
- int main(){
- printf("Введите количество книг\n");
- scanf("%d",&n);
- for(int i = 0; i < n; i++){
- printf("Введите регистрационный комер книги\n");
- scanf("%d",&books[i].num);
- printf("ФИО автора книги\n");
- scanf("%s",books[i].authorName);
- printf("Название\n");
- scanf("%s",books[i].bookName);
- printf("Издательство\n");
- scanf("%s",books[i].publishing);
- printf("Год издания\n");
- scanf("%d",&books[i].year);
- printf("Количество страниц\n");
- scanf("%d",books[i].countOfPages);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement