void viewAllBooks() { char bookID[20]; for (int i = 0; i < numBooks; i++) { printf("查询结果:\n"); printf("编号:%s\n", books[i].bookID); printf("书名:%s\n", books[i].bookName); printf("作者:%s\n", books[i].author); printf("数量:%d\n", books[i].amount); printf("出版社:%s\n\n", books[i].pub); while (i == numBooks) { return; } } }

修改以下代码的输出格式保持整齐与美观:void viewAllBooks char bookID20; for int i = 0; i numBooks; i++	 printf查询结果:n; printf编号:sn booksibookID; printf书名:sn booksibookName;

原文地址: https://www.cveoy.top/t/topic/hp6r 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录