// Finale Version 1.0 //
//--------------------//
#include
#include
#include
//globale Variablendefinitionen
int x=0, xz=0, z=0, t=0, count=0, azahl, ziehungszahlen[6];
struct auswertung
{
int gleich3, gleich4, gleich5, gleich6;
};
struct auswertung ausw;
struct lotto
{
int zahlen[7];
};
struct lotto ls[2000];
//globale Variablendefinition ENDE ---
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//Definition Funktionen
void ziehung();
void vergleich();
void lottopot();
//Definition Funktionen ENDE ---
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//Main
int main()
{
azahl=1999;
printf("Eingebene Anzahl der Lottoscheine: %dn", azahl);
azahl=azahl-1;
printf("n Z1 | Z2 | Z3 | Z4 | Z5 | Z6 |n");
printf(" -----------------------------n");
lottopot();
ziehung();
vergleich();
printf("nnZahlenvergleich ausgeführtn3er: %dn4er: %dn5er: %dn6er: %d", ausw.gleich3, ausw.gleich4, ausw.gleich5, ausw.gleich6);
return 0;
}
//Main ENDE ---
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//Funktionsdefinitionen
//VOID ZIEHUNG
void ziehung()
{
int i=0, t=0, startw=50, x=0;
srand(startw);
for (x = 0; x
//--------------------//
#include
#include
#include
//globale Variablendefinitionen
int x=0, xz=0, z=0, t=0, count=0, azahl, ziehungszahlen[6];
struct auswertung
{
int gleich3, gleich4, gleich5, gleich6;
};
struct auswertung ausw;
struct lotto
{
int zahlen[7];
};
struct lotto ls[2000];
//globale Variablendefinition ENDE ---
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//Definition Funktionen
void ziehung();
void vergleich();
void lottopot();
//Definition Funktionen ENDE ---
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//Main
int main()
{
azahl=1999;
printf("Eingebene Anzahl der Lottoscheine: %dn", azahl);
azahl=azahl-1;
printf("n Z1 | Z2 | Z3 | Z4 | Z5 | Z6 |n");
printf(" -----------------------------n");
lottopot();
ziehung();
vergleich();
printf("nnZahlenvergleich ausgeführtn3er: %dn4er: %dn5er: %dn6er: %d", ausw.gleich3, ausw.gleich4, ausw.gleich5, ausw.gleich6);
return 0;
}
//Main ENDE ---
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//Funktionsdefinitionen
//VOID ZIEHUNG
void ziehung()
{
int i=0, t=0, startw=50, x=0;
srand(startw);
for (x = 0; x
Kommentar