473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Jak zapisać pętlę for, aby po każdej iteracji zmienna i1 zwiększała się o 2,
a i2 o 4.

Dzięki

Nov 15 '05 #1
14 1796
In english, how to write for loop to change i1 and i2 after each iterations?

Thanks
Nov 15 '05 #2
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
Nov 15 '05 #3
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.
Nov 15 '05 #4
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:Th*************@gmail.com>

Nov 15 '05 #5

"hokus" <i.****@have.mail> schreef in bericht
news:dh**********@atlantis.news.tpi.pl...
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
Nov 15 '05 #6
Bruintje Beer wrote on 01/10/05 :
"hokus" <i.****@have.mail> schreef in bericht
news:dh**********@atlantis.news.tpi.pl...
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?"
Nov 15 '05 #7
On Sat, 01 Oct 2005 16:44:59 +0200, in comp.lang.c , "Emmanuel
Delahaye" <em***@YOURBRAnoos.fr> wrote:
Bruintje Beer wrote on 01/10/05 :
"hokus" <i.****@have.mail> schreef in bericht
news:dh**********@atlantis.news.tpi.pl...
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 =----
Nov 15 '05 #8
Mark McIntyre wrote on 02/10/05 :
On Sat, 01 Oct 2005 16:44:59 +0200, in comp.lang.c , "Emmanuel
Delahaye" <em***@YOURBRAnoos.fr> wrote:
Bruintje Beer wrote on 01/10/05 :
"hokus" <i.****@have.mail> schreef in bericht
news:dh**********@atlantis.news.tpi.pl...
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
Nov 15 '05 #9
On Sun, 02 Oct 2005 10:19:28 +0200, in comp.lang.c , "Emmanuel
Delahaye" <em***@YOURBRAnoos.fr> 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 =----
Nov 15 '05 #10

"Mark McIntyre" <ma**********@spamcop.net> wrote in message
news:sb********************************@4ax.com...
On Sun, 02 Oct 2005 10:19:28 +0200, in comp.lang.c , "Emmanuel
Delahaye" <em***@YOURBRAnoos.fr> 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'.
Nov 15 '05 #11
On Mon, 03 Oct 2005 15:57:19 GMT, in comp.lang.c , "Mark B"
<so***@localbar.com> 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 =----
Nov 15 '05 #12
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" <em***@YOURBRAnoos.fr> wrote:
Bruintje Beer wrote on 01/10/05 :

"hokus" <i.****@have.mail> schreef in bericht
news:dh**********@atlantis.news.tpi.pl...

> 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 ---
Nov 15 '05 #13
Joe Wright <jw*****@comcast.net> 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) ks***@mib.org <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.
Nov 15 '05 #14
On Tue, 04 Oct 2005 23:13:02 +0100, Mark McIntyre
<ma**********@spamcop.net> wrote:
On Mon, 03 Oct 2005 15:57:19 GMT, in comp.lang.c , "Mark B"
<so***@localbar.com> 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
re************************@att.net
Nov 15 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ALKASER266 | last post by:
Hey guyz I am a java beginner and I have problem with part of the code. The thing that I don't know how to do it in this code is how to show the user that he/she has input an invalid input In my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.