Umut Ulus

Kişisel İnternet Günlüğü

#include<iostream>

using std::cout;

using std::cin;

using std::endl;

#include<iomanip>

using std::setw;

#include<ctime>

int isPresent(int * arr, int uBound , int v)

{

int i = 0 ;

while( i < uBound)

{

if (*(arr+i) == v )

return i;

i++;

}

return -1;

}

int main()

{

int a=0,b[6];

srand(time(0));

cout<<endl<<endl<<setw(40)<<”SAYISAL LOTO”<<endl<<endl<<setw(46)<<”  Created by UMUT ULUS “<<endl<<endl;

cout<<setw(50)<<” Programi kapatmak  icin -1 girin “<<endl<<endl;

int v ;

int j;

while(a!=-1)

{

cout<<setw(50)<<” Programi kapatmak  icin -1 girin “<<endl;

cout<<setw(44)<<”     Kac kolon oynayacaksin ? : “;

cin>>a;

cout<<endl<<endl;

for(int i=1;i<=a;i++)

{

for(j = 0;j<6;j++)

{

v = rand()%49+1;

while( isPresent(b,j,v) >= 0 )

v = rand()%49+1;

b[j] = v;

}

cout<<setw(18)<<i<<”. Kolon : “<<setw(5);

for(int l=0;l<6;l++)

{

cout<<setw(5)<<b[l];

}

cout<<endl<<endl<<endl;

}

}

return 0;

}

Posted by Umut On Ekim - 26 - 2008 Programlama

Rss Besleme

Video

Etiketler

Porno İzle