Results 1 to 3 of 3

Thread: - C#

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Dec:2011
    Location: Varna
    Posts: 1

    - C#

    . , .
    : 1
    2
    : , , ,

    string s = "", t1 = textBox1.Text, t2 = textBox2.Text;
    bool pr = false;
    for (int i = 0; i < t1.Length; i++)
    {
    for (int j = 0; j < t2.Length; j++)
    {
    if (j + s.Length < t2.Length)
    {
    if (t2.Substring(j, s.Length) == s)
    {
    pr = true;
    }
    }

    }
    if (pr)
    {
    s += t1[i];
    pr = false;
    // listBox1.Items.Add(s);
    }
    else
    {
    if (s.Length >= 2)
    {
    listBox1.Items.Add(s);
    s = t1[i].ToString();
    }
    }
    }
    }

    , . , , ! : )))

  2. #2
    AMD fan EvilDevil_'s Avatar
    Join Date: Dec:2010
    Location:
    Posts: 1,275
    (++ #): , . (). , . , (). [x,x+1,...,y).
    , . , .

    , .

    Laa shay'a waqi'un moutlaq bale kouloun moumkine.
    Nulla &#233; reale, tutto &#233; lecito.

  3. #3
    Registered User
    Join Date: Feb:2006
    Location: Plovdiv
    Posts: 392
    :
    Code:
    if (arr[i, j] != 0 && arr[i - 1, j - 1] == 0)
    Code:
    if (arr[i, j] > 1 && arr[i - 1, j - 1] == 0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |