Skip to content

Instantly share code, notes, and snippets.

@Sotalbireo
Created November 8, 2018 16:45
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 Sotalbireo/b74b9a97ee64125eeafd37e8da393914 to your computer and use it in GitHub Desktop.
Save Sotalbireo/b74b9a97ee64125eeafd37e8da393914 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
void tokoroten(int arr[], int val)
{
arr[0] = arr[1];
arr[1] = arr[2];
arr[2] = val;
}
int main(void)
{
int i,j=0;
int hanshin[3] = {0, 0, 0};
int nippon[3] = {3, 3, 4};
int tmp;
srand((unsigned)time(NULL));
system("cls");
do
{
if (i==55)
{
printf("\n");
i=0;
}
tmp = rand()%10;
printf("%d", tmp);
++i; ++j;
tokoroten(hanshin, tmp);
}while (memcmp(hanshin, nippon, sizeof(int)*3) != 0);
printf("\n\n");
printf("_人人人人_\n> 3 3 - 4 <\n ̄Y^Y^Y^Y^ ̄\n");
printf("なんでや!阪神関係ないやろ!!(ドカボコバキ)\n\n");
printf("あなたは%d年日本シリーズで阪神ファンに殴られました。\n", j);
printf("終了するにはエンターキーを押してください...");
getchar();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment