Thread: calculating the results of loops

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2006
    Location
    Turkey
    Posts
    5

    Question calculating the results of loops

    Hi....
    I am studying in 10th class and also studying for Computer Olimpiad Games. In first exam, there will be some loop problems which i can solve in some mins but i want to make my speed faster to solve them. So i am asking your ways to solve those loops. p.s:"not the easy ones. As in the example. I can send you more types if you ask for..."

    ----------------------
    example:
    ---------------------------------
    int a,b,c,m=0;
    for(a=1;a<=62;a++)
    for(b=a;b<=62-a;b++)
    for(c=b;c<=31;c++)
    m+=a+b+c;
    ----------------------------------
    what is the last value of m?
    ----------------------
    Last edited by siliconian; 03-05-2006 at 01:08 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recursion
    By Lionmane in forum C Programming
    Replies: 11
    Last Post: 06-04-2005, 12:00 AM
  2. 72hour GDC Results
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 07-05-2004, 11:46 PM
  3. strange numbers, while loops questionable?
    By exluddite in forum C++ Programming
    Replies: 8
    Last Post: 05-06-2004, 11:11 AM
  4. Same seed for srand yields different results
    By codegirl in forum C++ Programming
    Replies: 3
    Last Post: 06-23-2003, 02:39 PM
  5. help with arrays and loops
    By jdiazj1 in forum C Programming
    Replies: 4
    Last Post: 11-24-2001, 04:28 PM