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

enum {MYSIZE=6,MYASIZE=49};

int enthaelt(const int *a,int z)
{
	int i;
	for(i=0;i<MYSIZE;++i)
	if(a[i]==z) return 1;
	return 0;
}

int main()
{
    int i, x, array[MYSIZE]={0};

    srand(time(0));              //Zufallszahlengenerator

    for(i=0; i<MYSIZE; i++)          // Schleife zur Bestimmung der 6 Felder
    {
    	while( enthaelt(array,x=rand()%MYASIZE+1) );
    	printf(" %d ",array[i]=x);
    }

	return 0;
}
