for( int i1=0,i2=0 ; i1<n1 && i2<n2; i1+=2, i2+=4)

Discussion in 'C Programming' started by hokus, Sep 28, 2005.

  1. hokus

    hokus Guest

    Jak zapisaæ pêtlê for, aby po ka¿dej iteracji zmienna i1 zwiêksza³a siê o 2,
    a i2 o 4.

    Dziêki
     
    hokus, Sep 28, 2005
    #1
    1. Advertising

  2. hokus

    hokus Guest

    In english, how to write for loop to change i1 and i2 after each iterations?

    Thanks
     
    hokus, Sep 28, 2005
    #2
    1. Advertising

  3. hokus wrote on 28/09/05 :
    > Jak zapisać pętlę for, aby po każdej iteracji zmienna i1 zwiększała się o 2,
    > a i2 o 4.
    >
    > Dzięki


    My Polish is rusty. Please try news:pl.comp.lang.c

    Thanks.


    --
    Emmanuel
    The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
    The C-library: http://www.dinkumware.com/refxc.html

    "It's specified. But anyone who writes code like that should be
    transmogrified into earthworms and fed to ducks." -- Chris Dollin CLC
     
    Emmanuel Delahaye, Sep 28, 2005
    #3
  4. hokus wrote on 28/09/05 :
    > In english, how to write for loop to change i1 and i2 after each iterations?
    >
    > Thanks


    Please place your code in the body. I can't read the subject line (too
    small characters).

    --
    Emmanuel
    The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
    The C-library: http://www.dinkumware.com/refxc.html

    "Mal nommer les choses c'est ajouter du malheur au
    monde." -- Albert Camus.
     
    Emmanuel Delahaye, Sep 28, 2005
    #4
  5. hokus wrote:
    >
    > In english, how to write for loop to change i1 and i2 after each iterations?
    >
    > Thanks


    (Sorry, I don't speak Polish, and Babelfish doesn't have Polish, either.)

    Exactly as you have in your subject line. Place multiple comma-separated
    items as the third part of the "for" statement.

    However, you can't put "int i1=0,i2=0" within the for statement (though
    this may be allowed in C99):

    int i1, i2;
    for ( i1=0, i2=0 ; i1<n1 && i2<n2 ; i1 += 2, i2 += 4 )
    {
    ...
    }

    --
    +-------------------------+--------------------+-----------------------------+
    | Kenneth J. Brody | www.hvcomputer.com | |
    | kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
    +-------------------------+--------------------+-----------------------------+
    Don't e-mail me at: <mailto:>
     
    Kenneth Brody, Sep 28, 2005
    #5
  6. "hokus" <> schreef in bericht
    news:dhemi4$8ql$...
    > Jak zapisaæ pêtlê for, aby po ka¿dej iteracji zmienna i1 zwiêksza³a siê o
    > 2, a i2 o 4.
    >
    > Dziêki


    sounds like you have drunk too much vodka

    John
     
    Bruintje Beer, Oct 1, 2005
    #6
  7. Bruintje Beer wrote on 01/10/05 :
    > "hokus" <> schreef in bericht
    > news:dhemi4$8ql$...
    >> Jak zapisaæ pêtlê for, aby po ka¿dej iteracji zmienna i1 zwiêksza³a siê o
    >> 2, a i2 o 4.
    >>
    >> Dziêki

    >
    > sounds like you have drunk too much vodka


    There is a name for that: 'préjugé' or worst, 'racism'. In my country,
    it's a crime.

    --
    Emmanuel
    The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
    The C-library: http://www.dinkumware.com/refxc.html

    I once asked an expert COBOL programmer, how to
    declare local variables in COBOL, the reply was:
    "what is a local variable?"
     
    Emmanuel Delahaye, Oct 1, 2005
    #7
  8. On Sat, 01 Oct 2005 16:44:59 +0200, in comp.lang.c , "Emmanuel
    Delahaye" <> wrote:

    >Bruintje Beer wrote on 01/10/05 :
    >> "hokus" <> schreef in bericht
    >> news:dhemi4$8ql$...
    >>> Jak zapisaæ pêtlê for, aby po ka¿dej iteracji zmienna i1 zwiêksza³a siê o
    >>> 2, a i2 o 4.
    >>>
    >>> Dziêki

    >>
    >> sounds like you have drunk too much vodka

    >
    >There is a name for that: 'préjugé' or worst, 'racism'. In my country,
    >it's a crime.


    I imagine it was meant to be a joke.

    Certainly I don't regard it as racism - unless of course one is not
    allowed to make /any/ joke which disparages someone, since no matter
    what you say, it could be regarded as an -ism of some sort (racism,
    sexism, blondism, whatever).
    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Mark McIntyre, Oct 1, 2005
    #8
  9. Mark McIntyre wrote on 02/10/05 :
    > On Sat, 01 Oct 2005 16:44:59 +0200, in comp.lang.c , "Emmanuel
    > Delahaye" <> wrote:
    >
    >> Bruintje Beer wrote on 01/10/05 :
    >>> "hokus" <> schreef in bericht
    >>> news:dhemi4$8ql$...
    >>>> Jak zapisaæ pêtlê for, aby po ka¿dej iteracji zmienna i1 zwiêksza³a siê o
    >>>> 2, a i2 o 4.
    >>>>
    >>>> Dziêki
    >>>
    >>> sounds like you have drunk too much vodka

    >>
    >> There is a name for that: 'préjugé' or worst, 'racism'. In my country,
    >> it's a crime.

    >
    > I imagine it was meant to be a joke.


    It was not.

    > Certainly I don't regard it as racism -


    To emit a global judgement based on the origin of a person ? It is
    racism.

    Ok, we are off-topic...

    --
    Emmanuel
    The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
    The C-library: http://www.dinkumware.com/refxc.html

    "It's specified. But anyone who writes code like that should be
    transmogrified into earthworms and fed to ducks." -- Chris Dollin CLC
     
    Emmanuel Delahaye, Oct 2, 2005
    #9
  10. On Sun, 02 Oct 2005 10:19:28 +0200, in comp.lang.c , "Emmanuel
    Delahaye" <> wrote:

    >Mark McIntyre wrote on 02/10/05 :
    >> I imagine it was meant to be a joke.

    >
    >It was not.


    How can you possibly know that it wasn't meant to be a joke? As it
    happens I didn't think it was a particularly good joke, but it was
    clearly meant to be humourous.

    >> Certainly I don't regard it as racism -

    >
    >To emit a global judgement based on the origin of a person ? It is
    >racism.


    I don't see any *judgement* in the original post - the judgement was
    made entirely by you.

    If I had ten pee for every time someone's characterised scotsmen as
    tight or unintelligible in a humorous moment, I'd be moderately
    wealthy, as Scotsmen go. Does it bother me? No. Do I regard it as
    racism? No.

    Racism is when you get beaten up for being the in the wrong pub, or
    for talking to a girl the wrong colour, or your house gets firebombed
    for living in the wrong area, or you get spat on in the bus for having
    a funny accent, or ...

    Get a sense of proportion.
    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Mark McIntyre, Oct 2, 2005
    #10
  11. hokus

    Mark B Guest

    "Mark McIntyre" <> wrote in message
    news:...
    > On Sun, 02 Oct 2005 10:19:28 +0200, in comp.lang.c , "Emmanuel
    > Delahaye" <> wrote:
    >
    >>Mark McIntyre wrote on 02/10/05 :
    >>> I imagine it was meant to be a joke.

    >>
    >>It was not.

    >
    > How can you possibly know that it wasn't meant to be a joke? As it
    > happens I didn't think it was a particularly good joke, but it was
    > clearly meant to be humourous.
    >
    >>> Certainly I don't regard it as racism -

    >>
    >>To emit a global judgement based on the origin of a person ? It is
    >>racism.

    No, it's not.

    > I don't see any *judgement* in the original post - the judgement was
    > made entirely by you.
    >
    > If I had ten pee for every time someone's characterised scotsmen as
    > tight or unintelligible in a humorous moment, I'd be moderately
    > wealthy, as Scotsmen go. Does it bother me? No. Do I regard it as
    > racism? No.
    >
    > Racism is when you get beaten up for being the in the wrong pub,

    No, it's not.

    > for talking to a girl the wrong colour,

    No, it's not. Although calling someone 'the wrong color' may be ;)

    > or your house gets firebombed

    Nope.

    > for living in the wrong area,

    Nope.

    or you get spat on in the bus for having
    > a funny accent, or ...

    Nope.

    > Get a sense of proportion.

    Correct yours!

    Racism is discrimination based on 'race', hence the term 'racism'.
    Please note the difference between 'nationality' and 'race'.
     
    Mark B, Oct 3, 2005
    #11
  12. On Mon, 03 Oct 2005 15:57:19 GMT, in comp.lang.c , "Mark B"
    <> wrote:

    (I said)
    >> Get a sense of proportion.

    >Correct yours!


    Grin.

    >Racism is discrimination based on 'race', hence the term 'racism'.


    And all the things I listed were examples of that.
    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Mark McIntyre, Oct 4, 2005
    #12
  13. hokus

    Joe Wright Guest

    Emmanuel Delahaye wrote:
    > Mark McIntyre wrote on 02/10/05 :
    >
    >> On Sat, 01 Oct 2005 16:44:59 +0200, in comp.lang.c , "Emmanuel
    >> Delahaye" <> wrote:
    >>
    >>> Bruintje Beer wrote on 01/10/05 :
    >>>
    >>>> "hokus" <> schreef in bericht
    >>>> news:dhemi4$8ql$...
    >>>>
    >>>>> Jak zapisaæ pêtlê for, aby po ka¿dej iteracji zmienna i1 zwiêksza³a
    >>>>> siê o 2, a i2 o 4.
    >>>>>
    >>>>> Dziêki
    >>>>
    >>>>
    >>>> sounds like you have drunk too much vodka
    >>>
    >>>
    >>> There is a name for that: 'préjugé' or worst, 'racism'. In my
    >>> country, it's a crime.

    >>
    >>
    >> I imagine it was meant to be a joke.

    >
    >
    > It was not.
    >
    >> Certainly I don't regard it as racism -

    >
    >
    > To emit a global judgement based on the origin of a person ? It is racism.
    >
    > Ok, we are off-topic...
    >


    Emmanuel, you have it wrong. It is not racist for the English to allude
    to the French as (insert insult here). It could be prejudice, a bad
    thing or it might be discrimination (an arguably good thing) but most of
    France and England share the same race.

    Racism, where it exists, is a very different and more dangerous
    situation. It is where the immigrant Mullah in Paris considers himself
    superior to his French hosts, the old British colonialist discoursing on
    the inferiority of the Indian "wogs". That's racism. And Wrong and Ugly.

    Commenting lightly on the Irish or Russian proclivity to drink does not
    rise to the level of exhibiting racism. Really.

    I've heard that the French actually cultivate garden snails as food!
    Disgusting! But not racist.

    You've said that prejudice and racism are somehow crimes in France. Can
    you elaborate? What would a racist have to do to excite the Gendarmerie?
    How would anybody (officially) know whether you prejudged something?

    My last racist ideas left me in the late 1960's when I discovered that
    all people are more alike than they are different, and that all blood is
    red and all mother's tears are salt. Racist == Stupid.

    --
    Joe Wright
    "Everything should be made as simple as possible, but not simpler."
    --- Albert Einstein ---
     
    Joe Wright, Oct 5, 2005
    #13
  14. Joe Wright <> writes:
    [...]
    > You've said that prejudice and racism are somehow crimes in
    > France. Can you elaborate? What would a racist have to do to excite
    > the Gendarmerie? How would anybody (officially) know whether you
    > prejudged something?


    Can you elaborate *somewhere else*, please?

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Oct 5, 2005
    #14
  15. hokus

    Alan Balmer Guest

    On Tue, 04 Oct 2005 23:13:02 +0100, Mark McIntyre
    <> wrote:

    >On Mon, 03 Oct 2005 15:57:19 GMT, in comp.lang.c , "Mark B"
    ><> wrote:
    >
    >(I said)
    >>> Get a sense of proportion.

    >>Correct yours!

    >
    >Grin.
    >
    >>Racism is discrimination based on 'race', hence the term 'racism'.

    >
    >And all the things I listed were examples of that.


    Not to be discriminatory or anything, but in spite of the subject
    heading, I think you guys are in the wrong newsgroup.
    --
    Al Balmer
    Balmer Consulting
     
    Alan Balmer, Oct 5, 2005
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Schnoffos
    Replies:
    2
    Views:
    1,256
    Martien Verbruggen
    Jun 27, 2003
  2. Hal Styli
    Replies:
    14
    Views:
    1,716
    Old Wolf
    Jan 20, 2004
  3. arun
    Replies:
    8
    Views:
    485
    Dave Thompson
    Jul 31, 2006
  4. aling
    Replies:
    8
    Views:
    1,038
    Jim Langston
    Oct 20, 2005
  5. Replies:
    9
    Views:
    467
    James Kanze
    Apr 17, 2007
Loading...

Share This Page