Created
December 9, 2017 18:20
-
-
Save riza/c5fdd8b7ded0b682034a04220edf30b4 to your computer and use it in GitHub Desktop.
for irem adsfdsgf
This file contains hidden or 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
#include <stdio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
int dice() { | |
return ((rand() % 6) + 1); | |
} | |
int main() | |
{ | |
int aim = 2; | |
int attemp = 1; | |
int a,b; | |
for(;;) { | |
srand(time(NULL)); | |
a = dice(); | |
b = dice(); | |
if (a == b && a == aim) { | |
printf("Zarlar %d - %d\n",a,b); | |
if (attemp == 1) { | |
attemp = 2; | |
aim = 4; | |
} else if (attemp == 2) { | |
attemp = 3; | |
aim = 6; | |
} else if (attemp == 3){ | |
printf("Bitti :D \n"); | |
break; | |
} | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment