Advertisement
Guest User

Untitled

a guest
May 30th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. int min, max;
  2. int a, b;
  3. a=StrToInt(Edit1->Text);
  4. b=StrToInt(Edit2->Text);
  5. if(a>b)
  6. {
  7. min=b;
  8. max=a;
  9. }
  10. else
  11. {
  12. min=a;
  13. max=b;
  14. }
  15.  
  16. srand(time(0));
  17. int tab[15];
  18. for(int i=0; i<15; i++)
  19. {
  20. tab[i]=rand()%(max-min+1)+min;
  21. }
  22. l1->Text=tab[0];
  23. l2->Text=tab[1];
  24. l3->Text=tab[2];
  25. l4->Text=tab[3];
  26. l5->Text=tab[4];
  27. l6->Text=tab[5];
  28. l7->Text=tab[6];
  29. l8->Text=tab[7];
  30. l9->Text=tab[8];
  31. l10->Text=tab[9];
  32. l11->Text=tab[10];
  33. l12->Text=tab[11];
  34. l13->Text=tab[12];
  35. l14->Text=tab[13];
  36. l15->Text=tab[14];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement