Number divisible by 4
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Number divisible by 4

  1. #1
    Member
    Join Date
    Apr 2003
    Location
    Sydney
    Posts
    66

    Number divisible by 4

    Hiow do I write if a number is divisible by 4 ?
    AS2

    Thank you.

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,153
    Hi,

    Not totally sure what you mean by the question but here is a method to figure out if a number is divisible by 4, or any number if you change the MyNumber var

    PHP Code:
    var MyNumber:Number 4;
    var 
    i:Number;

    for (
    = -200200i++)
    {
        if (
    MyNumber == 0)
        {
            
    trace(": YES, remainder = " + (MyNumber));
        }
        else
        {
            
    trace(": No, remainder = " + (MyNumber));
        }

    written it MIGHT be something like, 16 % 4 = false !!!! i.m not too sure at all

    maybe search into Modulus

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


HTML5 Development Center

Poll by Flashkit.com