Add javascript
[gruntmaster-daemon.git] / t / problems / increment / ver.c
1 #include<stdio.h>
2 #include<stdlib.h>
3 #include<time.h>
4 #include<unistd.h>
5
6 int main(void){
7 srand(time(NULL));
8 for(int i=0;i<100;i++){
9 int nr = rand() % 100;
10 printf("%d\n", nr);
11 fflush(stdout);
12 int ret;
13 scanf("%d", &ret);
14 if(ret != nr + 1){
15 fprintf(stderr, "bad ret: %d instead of %d", ret, nr + 1);
16 return 1;
17 }
18 }
19
20 if(write(4, "20", 2) == -1)
21 perror("write");
22 return 0;
23 }
This page took 0.022385 seconds and 5 git commands to generate.