Guest User

Untitled

a guest
Apr 2nd, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. namespace Projekt_1
  2. {
  3. class Program
  4. {
  5. static bool szukanie(uint[] tablica, uint x)
  6. {
  7. int por = 0;
  8. int por1 = 0;
  9. int inc = 0;
  10. for (int i = 0; i < tablica.Length; i++, por++, inc++)
  11. {
  12. por1++;
  13. if (tablica[i] == x) return true;
  14. }
  15. return false;
  16.  
  17.  
  18. }
  19.  
  20. static void Main(string[] args)
  21. {
  22. uint[] tablica = new uint[268435456];
  23. for (uint i = 0; i < tablica.Length - 1; i++)
  24. {
  25. tablica[i] = i;
  26. }
  27.  
  28. uint x = 10000000;
  29. bool wynik;
  30. for (uint i = 1; i <= 20; i++, x += 10000000)
  31. {
  32. wynik = szukanie(tablica, x);
  33.  
  34. }
  35. Wyn(por);
  36.  
  37. }
  38.  
  39. static void Wyn(int por1,int por,int inc)
  40. {
  41. Console.WriteLine(" " + por, inc, por1);
  42. Console.ReadKey();
  43. }
  44.  
  45.  
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment