September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,17 +1,18 @@
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
/*Corrected by Abhishek Ghosh, Mahalaya (19th September) 2017*/
#define LOWER 0
#define UPPER 19
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main() {
srand(time(NULL));
time_t t;
int a;
srand((unsigned)time(&t));
for (;;) {
unsigned a = LOWER + rand() / (RAND_MAX / (UPPER - LOWER + 1) + 1);
a = rand()%20;
printf("%d\n", a);
if (a == 10) break;
if (a == 0) break;
}
return 0;
}