pseudocode

    Date: 10/18/07 (Algorithms)    Keywords: no keywords

    hey I was wondering if anyone could help me with this question,

    Write a pseudocode algorithm to print the numbers from 1 to 10, and then from 10 to 1, using exactly one loop. (Try using an if statement inside the loop.)

    so far I have this...

    for ( i = 1; i <= 20; i ++)
    print i
    if ( i > 10)
    i--

    I know it's probobly wrong... especially the if part.
    any suggestions?

    Source: http://community.livejournal.com/algorithms/93297.html

« Students Design Competition || Peak detection »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home