Created
July 11, 2011 10:27
-
-
Save kurochan/1075660 to your computer and use it in GitHub Desktop.
中三?の時に書いたプログラム。突っ込みどころが…
This file contains 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
//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