Skip to content

Instantly share code, notes, and snippets.

@austa
Created March 5, 2013 15:41
Show Gist options
  • Save austa/5091176 to your computer and use it in GitHub Desktop.
Save austa/5091176 to your computer and use it in GitHub Desktop.
/*
* 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