CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012
    Posts
    3

    a boolean divisible

    Number nr3 is not evenly divisible by the number nr2.
    i dont know how to type it in a boolean so can any one tell me how you can write it?

  2. #2
    Join Date
    Apr 2007
    Posts
    442

    Re: a boolean divisible

    Use modulo % as in: num1%num2==0

  3. #3
    Join Date
    Nov 2011
    Posts
    189

    Re: a boolean divisible

    Booleans are pretty easy to use;
    Look:
    Int i = 478;
    Boolean b = i == 56;

    So boolean b will be false since 478 is not equal to 56

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured