展开全部
#include <stdio.h>
struct book
{
char name[20];
char author[20];
int pages;
int price;
};
int main(void)
{
struct book bk;
//
scanf("%s", bk.name);
scanf("%s", bk.author);
scanf("%d", &(bk.pages));
scanf("%d", &(bk.price));
//
printf("name: %s\n", bk.name);
printf("auhtor: %s\n", bk.author);
printf("pages: %d\n", bk.pages);
printf("price: %d\n", bk.price);
return 0;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询