至急おねがいします。
Posted: 2015年12月01日(火) 16:35
以下のプログラムをtypedefを用いて書き換えてください。
#include<stdio.h>
#include<string.h>
struct student{
char name[20];
int math;
int eng;
};
int main()
{
struct student st_a={"Kosuke",50,50};
struct student st_b;
strcpy(st_b.name,"Kosuke");
st_b.math=60;
st_b.eng=60;
printf("名前;%s 数学:%d 英語:%d\n",st_b.name,st_b.math,st_b.eng);
return 0;
}
#include<stdio.h>
#include<string.h>
struct student{
char name[20];
int math;
int eng;
};
int main()
{
struct student st_a={"Kosuke",50,50};
struct student st_b;
strcpy(st_b.name,"Kosuke");
st_b.math=60;
st_b.eng=60;
printf("名前;%s 数学:%d 英語:%d\n",st_b.name,st_b.math,st_b.eng);
return 0;
}