发布时间:2019-08-09 03:08:08
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t t;
int card_number;
int count;
count = 0;
srand((unsigned)time(&t));
printf("one random numbers from 0 to 14\n\n");
card_number = rand() % 15;
scanf_s("%d\n", &card_number);
if (card_number <= 9)
{
count = count + 1;
if (card_number>9)
{
count = count - 1;
}
printf("%d\n", count);
}
printf("%d\n", rand() % 15);
return 0;
1>d:\my documents\visual studio 2013\projects\2233main.c\2233main.c\2233main.c(28): fatal error C1075: end of file found before the left brace '{' at 'd:\my documents\visual studio 2013\projects\2233main.c\2233main.c\2233main.c(5)' was matched