Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Projekt_1
- {
- class Program
- {
- static bool szukanie(uint[] tablica, uint x)
- {
- int por = 0;
- int por1 = 0;
- int inc = 0;
- for (int i = 0; i < tablica.Length; i++, por++, inc++)
- {
- por1++;
- if (tablica[i] == x) return true;
- }
- return false;
- }
- static void Main(string[] args)
- {
- uint[] tablica = new uint[268435456];
- for (uint i = 0; i < tablica.Length - 1; i++)
- {
- tablica[i] = i;
- }
- uint x = 10000000;
- bool wynik;
- for (uint i = 1; i <= 20; i++, x += 10000000)
- {
- wynik = szukanie(tablica, x);
- }
- Wyn(por);
- }
- static void Wyn(int por1,int por,int inc)
- {
- Console.WriteLine(" " + por, inc, por1);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment