C/C++の宿題を片付けます 104代目
■ このスレッドは過去ログ倉庫に格納されています
0182デフォルトの名無しさん
2008/02/11(月) 18:40:08#include <stdio.h>
#include <string.h>
int main(void)
{
char str[256];
int top;
printf("入力:");
start:
top=0;
fgets(str,256,stdin);
again0:
if(str[top]>=48&&str[top]<=57){
printf("再入力:");
goto start;
}
if(top++<strlen(str))goto again0;
top=0;
again1:
if(str[top]=='a'){
top++;
goto again1;
}
printf("出力:");
again2:
printf("%c",str[top++]);
if(str[top]!=NULL)goto again2;
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています