其他分享
首页 > 其他分享> > 我的第九个代码

我的第九个代码

作者:互联网

我的第九个代码

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

struct Book
{
char name[20];
short int price;
};

int main()
{
struct Book b1 = { "C语言程序设计",45 };
printf("书名:%s\n", b1.name);
printf("价格:%d\n", b1.price);
b1.price= 55;
printf("改价之后:%d\n", b1.price);
return 0;
}
//学习结构体(创建一本书)

标签:第九个,struct,int,price,Book,b1,printf,代码
来源: https://www.cnblogs.com/oewjo/p/14408188.html