Sunday, May 4, 2008

How to know if an ID Number is truly DLSU's

just for fun,
 
for some reason,
 
an ID number consists of 8 digits,
 
you multiply the :
 
1st Digit by 8.
 
2nd by 7
 
and so on, just like this,
 
10708502
 
     1 * 8 = 8    
     0 * 7 = 0    
     7 * 6 = 42  
     0 * 5 = 0    
     8 * 4 = 32   
     5 * 3 = 15  
     0 * 2 = 0  
     2 * 1 = 2   
   ------------------
              99
 
the total will always be divisible by eleven, else it's not a lasalian ID number =p
 
//matagal na ito eh, nahalungkat ko lang sa email ko.. hehe.. baka hindi niyo pa alam.. try niyo.. :)

12 comments:

  1. nyahaha. wala ako magawa kaya gumawa ako ng program para mas mabilis magcompute.. :P

    #include

    main()
    {
    int nCtr, nId, nTemp, nTotal;

    do
    { nTotal=0;
    printf("\n\nEnter Id Number: ");
    scanf("%d", &nTemp);

    if(nTemp!=-999)
    {
    nId=nTemp;
    for(nCtr=1;nId>0;nCtr++)
    {
    nTotal+=nId%10*nCtr;
    nId/=10;
    }

    printf("Total: %d\n", nTotal);

    if(nTotal%11==0)
    printf("ID number is from DLSU\n");
    else
    printf("ID number is NOT from DLSU\n");
    }

    }while(nTemp!=-999);

    }

    compile niyo na lang.. ahahaha!

    ReplyDelete

  2. adik haha... hindi na nagsawa sa kakaprogram

    ReplyDelete
  3. an example of a true programmer: andrew pamorada! adik! broed ka noh...

    ReplyDelete
  4. shet disctru + dasalgo... nosebleed. :))

    ReplyDelete
  5. vodka + sandie+dana+ jenna+demi+carmel+den+andie+piton+gau = FUN FUN FUN! hehe miss you!

    ReplyDelete
  6. oh em gee dito pa talaga sa multiply ni andrew. pero miss ko na rin kayo. and sorry andrew. =))

    ReplyDelete
  7. eto pala yung cnasabing hashing function ng mga ID number... haha ngaun ko lng na gets. :D

    ReplyDelete
  8. waw oonga noh! astig :) hahaha gawan daw ba ng program :))

    ReplyDelete
  9. pansin ko nga! ahahaha! miss you s20.. huhu..

    ReplyDelete
  10. hashing function == nosebleed.. T_T

    ReplyDelete
  11. ang lupit ko nga, tinype ko lang yan.. then nung kinompile ko na.. walang bug.. kahit isa.. wahahahaha! >:)

    ReplyDelete
  12. haha... chorva. eklabooo. AHAHAH. amf psukan na nian. D:

    ReplyDelete