CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: you69

Search: Search took 0.02 seconds.

  1. Replies
    13
    Views
    20,637

    Re: C# do-while? Necklace Problem

    if (a >= 10) a %= 10;


    it's means that if the new number (a + b) is larger than 10 we take only the right digit (Modulo 10).
    for example (assuming that the numbers are integers):
    14 / 10 = 1....
  2. Replies
    13
    Views
    20,637

    Re: C# do-while? Necklace Problem

    int original_a = 0;
    int original_b = 0;


    that's what called to initialize a variable. you should to do that otherwise usually the variable will contain garbage. also it is a good...
  3. Replies
    13
    Views
    20,637

    Re: C# do-while? Necklace Problem

    I was bored... I'm hope that this will help you.
    If you have questions don't hesitate to ask :).



    class Program
    {
    static void Main(string[] args)
    {
    int...
Results 1 to 3 of 3





Click Here to Expand Forum to Full Width

Featured