Skip to content

Instantly share code, notes, and snippets.

@ikegami-yukino
Created January 29, 2021 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikegami-yukino/c271763cf7a340a938577a1779c77fce to your computer and use it in GitHub Desktop.
Save ikegami-yukino/c271763cf7a340a938577a1779c77fce to your computer and use it in GitHub Desktop.
#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