What's new

Closed Random Wheel Generator! Made for Raffles..

Status
Not open for further replies.

Xin Snowflakes

Eternal Poster
Joined
Jan 28, 2019
Posts
1,127
Reaction
791
Points
393
Age
26
Wheel Generator:


Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

void delay(int nos){
    int ms = 1000 * nos;
    clock_t st = clock();
    while(clock() < st + ms);
}

int main(){
    int i, n, ml = 150;
    int winners = 7;
    time_t * t;
    srand((unsigned) time(t));
    printf("Lucky Giveaway Winners: %d\n",winners);
    for(i = 0;i < winners;i++){
    printf("Winner [%i]: %d\n",(i+1),rand() % ml + 1);
    delay(2000);
    }
    printf("Congrats to these Winners.\n");
    return(0);
}


Debugging:
Code:
Ignore the Implicit Declaration Error while Compiling via GCC. Free to Edit, and Add something new.



Proof of Concept:
1566715331769.png



( C ) - Snowflakes
 

Attachments

Status
Not open for further replies.
Back
Top