C/C++の宿題を片づけます 50代目
■ このスレッドは過去ログ倉庫に格納されています
0541デフォルトの名無しさん
2005/09/26(月) 07:08:10#include <stdio.h>
#include <assert.h>
int search(char *input, char *keyword, int pos)
{
assert(pos!=0);
pos--;
while (input[pos] != keyword[0])
{
pos++;
if (!input[pos])
return 0;
}
return pos+1;
}
int count(char *input)
{
int src=input;
while (*(++input));
return input-src-1;
}
int main()
{
char input[80];
char keyword[80];
int pos=0;
int cntkeyword=0;
■ このスレッドは過去ログ倉庫に格納されています