标签:c语言
#include<stdio.h>
void main()
{ struct person
{ char name[20];
char sex;
struct date
{int year;
int month;
int day;
}birthday;
float height;
}per;
printf("Enter the name:");
gets(per.name);per.sex=‘M‘;
per.birthday.year=2013;
per.birthday.year++;
per.birthday.month=12;
per.birthday.day=15;
per.height=(175+176)/2;
printf("%s%3c%4d/%2d/%d%7.1f\n",per.name,per.sex,
per.birthday.month,per.birthday.day,
per.birthday.year,per.height);
}
本文出自 “努力奋斗,互相提高” 博客,请务必保留此出处http://c10086.blog.51cto.com/6433044/1413771
编程题:对结构体变量中成员的引用展示。,布布扣,bubuko.com
标签:c语言
原文地址:http://c10086.blog.51cto.com/6433044/1413771