Search:

Type: Posts; User: CommonTater

Search: Search took 0.06 seconds.

  1. Replies
    10
    Views
    3,210

    No j is not saved because you don't go back to...

    No j is not saved because you don't go back to the outer loop until the inner one is finished and each time you re-enter the inner loop it's starting over... the numerical printout from my example...
  2. Replies
    10
    Views
    3,210

    Initialization is done only at the beginning of a...

    Initialization is done only at the beginning of a for() loop... any for() loop, every for() loop...

    You have two loops, one running inside the other...
    Look at the way the numbers count up...
    ...
  3. Replies
    10
    Views
    3,210

    Here try this little code snippet... ...

    Here try this little code snippet...


    #include <stdio.h>

    int main (void)
    { int i, j;

    for (i = 0; i < 5; i++)
    for (j = 0; j< i; j++)
  4. Replies
    10
    Views
    3,210

    If you would learn to indent your code properly...

    If you would learn to indent your code properly you would actually be able to see what is happening...



    #include <stdio.h>

    int binom(int n, int k)
    {
    int result=1;
    int i;
Results 1 to 4 of 4