C語(yǔ)言程序設(shè)計(jì)(蘇小紅著)課后習(xí)題答案下載
C語(yǔ)言是一種計(jì)算機(jī)程序設(shè)計(jì)語(yǔ)言。它既有高級(jí)語(yǔ)言的.特點(diǎn),又具有匯編語(yǔ)言的特點(diǎn)。以下是由陽(yáng)光網(wǎng)小編整理關(guān)于C語(yǔ)言程序設(shè)計(jì)(蘇小紅著)課后習(xí)題答案下載地址,希望大家喜歡!
點(diǎn)擊進(jìn)入:C語(yǔ)言程序設(shè)計(jì)(蘇小紅著)課后習(xí)題答案下載
C語(yǔ)言程序設(shè)計(jì)(蘇小紅著)課后習(xí)題答案預(yù)覽
12.1 #include<stdio.h>
typedef struct data
{
int year;
int month;
int day;
}DATA;
typedef struct work
{
char a[14];
char b[10];
char c[6];
}WORK;
typedef struct student
{
char studentName[10];
char studentSex;
DATA birthday;
WORK profession;
}STUDENT;
int main()
{
STUDENT stu={"王剛",'M',{1991,5,19},{"信息工程系","學(xué)習(xí)人員","學(xué)生"}};
printf("stu:%2s%3c%6d/%02d/%02d%4s,%4s,%4s\n",stu.studentName,stu.studentSex,stu.bi
rthday.year,stu.birthday.month,stu.birthday.day,
stu.profession.a,stu.profession.b,stu.profession.c);
return 0;
}
12.4 #include<stdio.h>
#include<string.h>
#define N 10
typedef struct people
{
char peopleName[10];
}PEOPLE;
int main()
{
int sum1=0,sum2=0,sum3=0,sum4=0;
int i;
char name[N][N];
PEOPLE stu[5]={"zhang","li","wang"};
printf("Enter their name:\n");
for(i=0;i<10;i++)
{
gets(name[i]);
if(strcmp(name[i],stu[0].peopleName)==0)
sum1++;
else if(strcmp(name[i],stu[1].peopleName)==0)
sum2++;
else if(strcmp(name[i],stu[2].peopleName)==0)
sum3++;
else
sum4++;
}
printf("stu:%4s%2d\n",stu[i].peopleName,sum[j]);
printf("stu:%4s%2d\n",stu[1].peopleName,sum2);
printf("stu:%4s%2d\n",stu[2].peopleName,sum3);
printf("%2d\n",sum4);
return 0;
}
【C語(yǔ)言程序設(shè)計(jì)(蘇小紅著)課后習(xí)題答案下載】相關(guān)文章:
1.C語(yǔ)言程序設(shè)計(jì)(蘇小紅著)課后習(xí)題答案下載
2.C語(yǔ)言程序設(shè)計(jì)(蘇小紅著)課后答案下載
3.《C語(yǔ)言程序設(shè)計(jì)》蘇小紅著課后答案
4.C語(yǔ)言程序設(shè)計(jì)(蘇小紅著)課后習(xí)題第八章答案
5.C語(yǔ)言程序設(shè)計(jì)(方風(fēng)波著)課后習(xí)題答案下載
6.C語(yǔ)言程序設(shè)計(jì)(楊勇著)課后答案下載