Created
January 29, 2021 06:47
-
-
Save ikegami-yukino/c271763cf7a340a938577a1779c77fce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define NUM_PATTERN 5 | |
#define MAX_LENGTH 255 | |
char user_input; | |
int idx; | |
char response[NUM_PATTERN][MAX_LENGTH]={ | |
{"さすがですね!"}, | |
{"知らなかったです…!"}, | |
{"すごーい!"}, | |
{"センスありますね!"}, | |
{"そうなんですね…!"} | |
}; | |
int main(){ | |
printf("せっかくだから何か話しませんか?\n> "); | |
while(1){ | |
scanf("%s", &user_input); | |
idx = rand() % NUM_PATTERN; | |
printf("%s\n> ", response[idx]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment