Skip to content

Instantly share code, notes, and snippets.

@kurochan
Created July 11, 2011 10:27
Show Gist options
  • Save kurochan/1075660 to your computer and use it in GitHub Desktop.
Save kurochan/1075660 to your computer and use it in GitHub Desktop.
中三?の時に書いたプログラム。突っ込みどころが…
//saikoro.c
#include<stdio.h>
int syori();
int saikoro();
int main()
{
syori();
return 0;
}
int syori()
{
char word;
int x;
printf("-----サイコロプログラム-----\n\n1~6までの数字をランダムに出力します。\n実行しますか?(y/n)");
scanf("%c",&word);
x=saikoro();
if(word=='y') printf("\n答えは,%dです。\n",x);
else return 0;
}
int saikoro()
{
return 5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment