#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
int main()
{
int s1,s2,s3,s4,s5,r1,s6,r2,a1,a2,t1,t2,t3,t4,t5,t6,a3,a4,a5,a6,r3,r4,r5,r6;
cout<<"Bilet numaranizi son haneden baslayarak : "<<endl;
do
{
cout<<"6.rakam = " ;
cin>>s6;
if(s6>9)
break;
cout<<"5.rakam = ";
cin>>s5;
if(s5>9)
break;
cout<<"4.rakam = ";
cin>>s4;
if(s4>9)
break;
cout<<"3.rakam = ";
cin>>s3;
if(s3>9)
break;
cout<<"2.rakam = ";
cin>>s2;
if(s2>9)
break;
cout<<"1.rakam = ";
cin>>s1;
if(s1>9)
break;
cout<<"Bilet numaraniz : "<<s1<<" "<<s2<<" "<<s3<<" "<<s4<<" "<<s5<<" "<<s6<<endl;
}
while(s1=='*');
cout<<endl;
cout<<endl<<endl;
srand (time(NULL));
for (int i=0; i<1; i++)
{
r6=rand()%10;
r5=rand()%10;
r4=rand()%10;
r3=rand()%10;
r2=rand()%10;
r1=rand()%10;
a1=r1;
a2=r2;
a3=r3;
a4=r4;
a5=r5;
a6=r5;
if(((((a1==s6 && a2==s5)&& a3==s4)&&a4==s3)&&a5==s2)&&a6==s1)
{
t1=a1;
t2=a2;
t3=a3;
t4=a4;
t5=a5;
t6=a6;
}
cout<<a6<<a5<<a4<<a3<<a2<<a1<<' ';
}
cout<<"SON ALTI RAKAMINA GORE KAZANANLAR "<<endl;
if(t1<100)
cout<<"HAYATTA CIKMAZ :) ";
for (int i=0; i<5; i++)
{
r5=rand()%10;
r4=rand()%10;
r3=rand()%10;
r2=rand()%10;
r1=rand()%10;
a1=r1;
a2=r2;
a3=r3;
a4=r4;
a5=r5;
if((((a1==s6 && a2==s5)&& a3==s4)&&a4==s3)&&a5==s2)
{
t1=a1;
t2=a2;
t3=a3;
t4=a4;
t5=a5;
}
cout<<a5<<a4<<a3<<a2<<a1<<' ';
}
cout<<"SON BES RAKAMINA GORE KAZANANLAR "<<endl;
if(t1<100)
cout<<"TEBRIKLER SON BES RAKAMINA GORE IKRAMIYE KAZANDINIZ";
for (int i=0; i<5; i++)
{ r4=rand()%10;
r3=rand()%10;
r2=rand()%10;
r1=rand()%10;
a1=r1;
a2=r2;
a3=r3;
a4=r4;
if(((a1==s6 && a2==s5)&& a3==s4)&&a4==s3)
{
t1=a1;
t2=a2;
t3=a3;
t4=a4;
}
cout<<a4<<a3<<a2<<a1<<' ';
}
cout<<"SON DORT RAKAMINA GORE KAZANANLAR "<<endl;
if(t1<100)
cout<<"TEBRIKLER SON DORT RAKAMINA GORE IKRAMIYE KAZANDINIZ";
for (int i=0; i<5; i++)
{
r3=rand()%10;
r2=rand()%10;
r1=rand()%10;
a1=r1;
a2=r2;
a3=r3;
if((a1==s6 && a2==s5)&&a3==s4)
{
t1=a1;
t2=a2;
t3=a3;
}
cout<<a3<<a2<<a1<<' ';
}cout<<"SON UC RAKAMA GORE KAZANANLAR ";
cout<<endl;
if(t1<100)
cout<<"TEBRIKLER SON 3 RAKAMINA GORE IKRAMIYE KAZANDINIZ "<<endl;
for (int i=0; i<10; i++)
{
r2=rand()%10 ;
r1=rand()%10 ;
a1=r1;
a2=r2;
cout<<a1<<a2<<' ';
if(a2==s6 && a1==s5)
{
t1=a1;
t2=a2;
}
}cout<<"SON IKI RAKAMA GORE KAZANANLAR ";
cout<<endl;
if(t1<100)
cout<<"TEBRIKLER SON IKI RAKAMINA GORE IKRAMIYE KAZANDINIZ ";
for(int i=0;i<2;i++)
{
r1=rand()%10;
r2=rand()%10;
a1=r1;
a2=r2;
if(a1==s6 || a2==s6)
cout<<"AMORTI KAZANDIN KAZANDINIZ :)";
}
return 0;
}