C/C++の宿題片付けます 124代目at TECH
C/C++の宿題片付けます 124代目 - 暇つぶし2ch368:デフォルトの名無しさん
09/03/17 18:34:47
>>357 364に先越されたorz...
#include<stdlib.h>
#include<stdio.h>
typedef struct P{struct P*x;char n[64];int a;}P;
P h,*c=&h;int q;
int main(){
 for(;
  c->x=malloc(sizeof(*c)),c=c->x,c->x=0,
  printf("Please,write down your name >"),scanf("%63s",&c->n),
  printf("How old are you? >"),scanf("%d",&c->a),
  printf("Continue?yes(1)or no(0)>"),scanf("%d",&q),q;
 );
 for(c=&h;c=c->x;printf("%s /%d\n",c->n,c->a));
}



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch