1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <stdio.h> #include <time.h> #include <stdlib.h> int main(void) { printf("µ¿Àü ´øÁö±â °ÔÀÓÀ» ½ÃÀÛÇÕ´Ï´Ù.\n"); srand(time(NULL)); // ÇöÀç ½Ã°£À» ³¼öÀÇ ¾¾¾Ñ°ªÀ¸·Î ÇÑ´Ù. int coin = rand() % 2; if (coin == 0) printf("¾Õ¸éÀÔ´Ï´Ù.\n"); else printf("µÞ¸éÀÔ´Ï´Ù.\n"); return 0; } | cs |