Language: C

#include<stdio.h>
#define COUNT_RESET 0
#define ARRAY_RESET 0
int main(){
	unsigned char card[200];
	unsigned short card_num;
	
	while(1){
		card_num = scan_word(card, 200);
		if(*card == '-'){
			break;
		}
		
		card_shuffle(card, card_num);
		
		print_word(card card_num);
	}
	return 0;
}

/* 関数名：配列初期化 */
/* 概要：渡されたアドレスを先頭とする配列の値を初期化する */
/* 引数：初期化する配列の先頭アドレス、その配列の大きさ */
/* 戻り値：なし */
void array_reset(unsigned char * array, unsigned short size)
{
	unsigned short usW_C_i; 	/* ループ変数 */
	/* 配列の初期化 */
	for(usW_C_i = COUNT_RESET;usW_C_i < size;usW_C_i++){
		*(array + usW_C_i) = ARRAY_RESET;
	}
}

/* 関数名：文字列入力 */
/* 概要：文字列を入力する。入力された文字列の長さを返す */
/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */
/* 戻り値：入力された文字列の長さ */
unsigned short scan_word(unsigned char * str, unsigned short length_max)
{
	unsigned short usW_C_count_text = COUNT_RESET;  	/* 文字列長カウンタ */
	unsigned short usW_C_i;                         	/* ループ変数 */

	/* 配列の初期化 */
	for(usW_C_i = COUNT_RESET;usW_C_i < length_max;usW_C_i++){
		*(str + usW_C_i) = ARRAY_RESET;
	}
	
	/* 文字列の入力 */
	for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
		scanf("%c", str + usW_C_i);
		/* 入力終了の処理 */
		if((*(str + usW_C_i) == ' ') || (*(str + usW_C_i) == '\n')){
			break;
		}
		/* 文字数をカウント */
		usW_C_count_text++;
	}

	/* 文字列長を返す */
	return usW_C_count_text;
}

void print_word(unsigned char * str, unsigned short length)
{
	unsigned short i;
	for(i = 0;i < length;i++){
		printf("%c", *(str + i));
	}
	printf("\n");
}

void card_shuffle(unsigned char * card, unsigned short num)
{
	unsigned short times;
	unsigned short stage;
	unsigned short work;
	unsigned short i, j;
	
	scanf("%d", &times);
	for(i = 0;i < times;i++){
		scanf("%d", &stage);
		for(j = num - 1;j > stage;j--){
			work = *(card + j);
			*(card + j) = *(card + j - stage);
			*(card + j - stage) = work;
		}
	}
}


Compiler output:
main.c: In function 'main':
main.c:9:28: error: implicit declaration of function 'scan_word' [-Wimplicit-function-declaration]
    9 |                 card_num = scan_word(card, 200);
      |                            ^~~~~~~~~
main.c:14:17: error: implicit declaration of function 'card_shuffle' [-Wimplicit-function-declaration]
   14 |                 card_shuffle(card, card_num);
      |                 ^~~~~~~~~~~~
main.c:16:17: error: implicit declaration of function 'print_word' [-Wimplicit-function-declaration]
   16 |                 print_word(card card_num);
      |                 ^~~~~~~~~~
main.c:16:32: error: expected ')' before 'card_num'
   16 |                 print_word(card card_num);
      |                           ~    ^~~~~~~~~
      |                                )
main.c: At top level:
main.c:38:16: error: conflicting types for 'scan_word'; have 'short unsigned int(unsigned char *, short unsigned int)'
   38 | unsigned short scan_word(unsigned char * str, unsigned short length_max)
      |                ^~~~~~~~~
main.c:9:28: note: previous implicit declaration of 'scan_word' with type 'int()'
    9 |                 card_num = scan_word(card, 200);
      |                            ^~~~~~~~~
main.c: In function 'scan_word':
main.c:49:23: error: 'LOOP_RESET' undeclared (first use in this function)
   49 |         for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
      |                       ^~~~~~~~~~
main.c:49:23: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:63:6: warning: conflicting types for 'print_word'; have 'void(unsigned char *, short unsigned int)'
   63 | void print_word(unsigned char * str, unsigned short length)
      |      ^~~~~~~~~~
main.c:16:17: note: previous implicit declaration of 'print_word' with type 'void(unsigned char *, short unsigned int)'
   16 |                 print_word(card card_num);
      |                 ^~~~~~~~~~
main.c:72:6: warning: conflicting types for 'card_shuffle'; have 'void(unsigned char *, short unsigned int)'
   72 | void card_shuffle(unsigned char * card, unsigned short num)
      |      ^~~~~~~~~~~~
main.c:14:17: note: previous implicit declaration of 'card_shuffle' with type 'void(unsigned char *, short unsigned int)'
   14 |                 card_shuffle(card, card_num);
      |                 ^~~~~~~~~~~~