Hallo leute ich habe eine Frage zu C++ ich muss ein Programm machen um ein Lotto spiel auszuwerten doch ich bekomms nicht in die zahlen zu vergleichen, bei mir siehts so aus..
#include <cstdlib>
#include <iostream>
using namespace std;
int a[5]; // Lottozahlen
int i, l, j;
int tip[5];
int main(int argc, char *argv[])
{
cin >> tip[0] >> tip[1] >> tip[2] >> tip[3] >> tip[4] >> tip[5];
a[5] = rand()%49;
for(l=0; l<5; l++)
{
cout<< a[0] << a[1] << a[2] << a[3] << a[4] << a[5] << a[6] << endl;
}
for (i=0; i<5; i++)
{
if(a[i]==tip[i+1]);
{
cout<< tip[i];
}
}
system("PAUSE");
return EXIT_SUCCESS;
}
kann mir vllt einer helfen? ach und diese > bzw < skleiner als bzw größer als..
Diese Frage teilen