Created
March 5, 2013 15:41
-
-
Save austa/5091176 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
/* | |
* File: main.c | |
* Author: alaattin | |
* | |
* Created on 05 Mart 2013 Salı, 17:05 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
/* | |
* | |
*/ | |
int main(int argc, char** argv) { | |
int ilk_zar, ikinci_zar; | |
srand(time(NULL)); | |
ilk_zar = rand() % 6; | |
ikinci_zar = rand() %6; | |
if(ilk_zar == ikinci_zar && ilk_zar !=0 && ikinci_zar !=0){ | |
printf("Tebrikler !!!!! %d %d\n", ilk_zar+1, ikinci_zar+1 ); | |
} | |
else { | |
printf("İlk zar...%d\n", ilk_zar+1); | |
printf("İkinci zar...%d\n", ikinci_zar+1); | |
printf("Ahahahhaa kaybettin \n"); | |
} | |
return (EXIT_SUCCESS); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment