Public feed #893840

Something

public text v1 · immutable
Raw Edit
·published 2008-02-06 14:34 UTC
rendered paste body
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>

int main(void){
    int i,j,k;   /* antal kolonner = j antal rader=i kolonner=k*/
    time_t t;
    time (&t);
    srand(t);
    printf("Hur manga tipskuponger vill du ha?\n");
    scanf("%d",&j);
    for(i=1;i<14;i++){                                /*upprepar i 14 rader*/
        printf("\n");
        printf("match nummer %d",i);
        for(k=0;k<j;k++){
        
                           if (rand()%3==0)
                           {
                              printf("|1  |");
                           }
                           if (rand()%3==1)
                           {
                              printf("| x |");
                           }
                           if (rand()%3==2)
                           {
                              printf("|  2|");
                           }
}}
scanf("%d",j);
}