|
以下のソース結果をファイルへ出力するための方法を考えます。。。 #include <stdio.h>
#include <string.h>
#define NUM 4
typedef struct{
int b ;/*学生番号*/
int s ;/*身長*/
char k[10];/*結果*/
}Stdya;
int main (void){
Stdya std[NUM];
int i;
for(i=0;i<NUM;i++){
printf("学生番号");
scanf("%d",&std[i].b);
printf("身長");
scanf("%d",&std[i].s);
if(180<=std[i].s)
strcpy(std[i].k,"tall");
else
strcpy(std[i].k," ");
printf("%d\t%d\t%s\n",std[i].b,std[i].s,std[i].k);
}
return 0;
}
以下のソース結果をファイルへ出力するための方法を考えます。。。
|

- >
- Yahoo!サービス
- >
- Yahoo!ブログ
- >
- 練習用




月夜はポインタの理解ができていないみたいですっ。一から出直しですがよろしくです!!!
2008/5/16(金) 午後 10:59