ログイン
編集不可のページディスカッション情報添付ファイル

検索条件 "linkto:"rei05/C言語/10031"" に対して、結果は0件でした。条件を変更するか、 HelpOnSearching を参照してください。
(!) 次のことを検討してください 同じ検索語で全文検索を行う.

メッセージを消す
rei05/C言語/10031

MMA

   1 #include<stdio.h>
   2 #include<string.h>
   3 int main()
   4 {
   5     char command[5],color[1000];
   6     int i=0;
   7     while(1){
   8         scanf("%s",command);
   9         if(strcmp(command,"push")==0){
  10             getchar();
  11             color[i++]=getchar();
  12         }else if(strcmp(command,"pop")==0){
  13             printf("%c\n",color[--i]);
  14         }else if(strcmp(command,"quit")==0){
  15             return(0);
  16         }
  17     }
  18 }