Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #define N 11235813 //ご自由にシード値を指定してくださいネ
- #define M 10000 //ループの回数です
- int main(){
- int i, cnt=0, tmp=0, bool;
- srand(N);
- printf("%d\n", N);
- for(i=0; i<M; i++){
- bool=rand();
- if(bool%2==0){
- printf("どこ");
- if(cnt>=4){
- tmp=1;
- break;
- }
- cnt=0;
- }else{
- cnt++;
- printf("ずん");
- }
- }
- if(tmp==1){
- printf("き! よ! し!\n");
- }else{
- printf("...残念!!!\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement