<M/> 170 Why so serious? Featured Poster

I have a simple Do While loop that doesn't work. What I am trying to do is to collect an integer and if the number is even, continue looping but if it is not even stop looping.

I can't get it to work with my code:

  int xyz = 0;
            do
            {
                Console.WriteLine(xyz);
                    xyz++;
            }
            while (xyz % 2);

Thanks in advance...

<M/> 170 Why so serious? Featured Poster

Okay, so I got it to print.

But the numbers in the last column don't make any sense to me, can someone help me make sure they are numbers between 1-10? The last numbers display in hundreds.

here is the code so far.

   Random rnd = new Random();
            Console.WriteLine("20 random integers from 0 - 10:");
            for (int ctr = 1; ctr <= 20; ctr++)
            {
                Console.Write("{0,10}", rnd.Next(0, 10));
                if (ctr % 5 == 0) Console.WriteLine(ctr);
            }
<M/> 170 Why so serious? Featured Poster

oh okay, that makes much sense.

Well, I am trying to print it by using a Console.WriteLine(i);

How come I can not print it?

<M/> 170 Why so serious? Featured Poster

Oh okay, I looked at the second link and can you explain to me what this means (line 3):

Random rnd = new Random();
for( int i = 0 ; i < 10; i++ ){
  var temp = rnd.Next(23, 10000);
}
<M/> 170 Why so serious? Featured Poster

(I am being honest, it is another assignment that I have attempted and failed to succeed on)

I have a question/assignment that requires me to generate 50 random numbers out of 10 numbers using a for loop. But for some odd reason I can't set it up nor does google act like a friend for me...

I have tried following this tutorial and it didn't help me...:

http://www.dotnetperls.com/continue

The answer to this question has to be simple, I know that, but unfortanetly I can't even set this up... All I generated so far was the loop to create numbers from 1-10...

Thanks in advance.

<M/> 170 Why so serious? Featured Poster

I thought you saw the movie

I don't think so, I may have... I guess it is one of those films that got stuck in my short term memory...

But oddly enough I know every single part of the movie ;)

<M/> 170 Why so serious? Featured Poster

It's still sunny now :)... okay fine, it is night...

<M/> 170 Why so serious? Featured Poster

<MICHAEL> Enjoy eating chicken soy.

Okay, I will be honest... I think it the name of it chicken soy... Everything that is sold in the restraunt are all vegies...

<M/> 170 Why so serious? Featured Poster

Lincoln and Argo are great films! (I have heard Argo is great... haven't seen it though)

<M/> 170 Why so serious? Featured Poster

Eating tofu is good but eating chicken tofu or any other stuff related to tofu is not really tofu.
Tofu is make from soy beans and most asian market sell tofu that is actually make from soy beans.
The tofu you mention is not really authentic. But as long you like it, it's good.

Well... i don't think i described it properly than. ;) You may have to go there and ask at the Irvine Spectrum.

<M/> 170 Why so serious? Featured Poster

@LastMitch, my favorite character was the dog.

<M/> 170 Why so serious? Featured Poster

Its sunny here :)

<M/> 170 Why so serious? Featured Poster

Well, I was refering to sweat shops... i was refering to them as road makers, construction, black smiths, mechanics, washers, mining, etc.

Just search up Afghan Child Labor.

<M/> 170 Why so serious? Featured Poster

It taste like those subway vegie patties. It taste werid.

No, no, no, no! it is not like that, it tastes so good! If you have been to the Irvine Spectrum, go to the vegie restruant near Chipotle.

<M/> 170 Why so serious? Featured Poster

When i am looking at an old article/thread, why is it that i see this message:

This article has expired from our marketplace

I was viewing this from my posts voted up page, and for some odd reason i can't see a thread that is 5 months old but i can see one that is older.

<M/> 170 Why so serious? Featured Poster

Impossible, a 5-year-old's mind is just getting started. Kids' minds and bodies develop at the same pace the world over. It's just a fact human evolution. It's the nature of the beast.

That is true but what i was referring to was that 5 year olds in the middle east would be doing labor jobs, supporting families, and already looking for wives.

<M/> 170 Why so serious? Featured Poster

Welcome!

<M/> 170 Why so serious? Featured Poster

BTW somebody shoot the commentators / presenters - Gabby Yorath, Jonathon Davies, John Inverdale and Jeremy Guscott aren't just poor, they're embarrassing.

Are they one of those commentators that don't know anything, like most commentators?

<M/> 170 Why so serious? Featured Poster

Their minds and bodies are not fully developed yet so we can't expect a 15-year-old to act the same as a 25 year-old

That is true in North America... but if you go to the middle east, a 5 year old would act like a 30 year old.

<M/> 170 Why so serious? Featured Poster

it

<M/> 170 Why so serious? Featured Poster

ok

<M/> 170 Why so serious? Featured Poster

the

<M/> 170 Why so serious? Featured Poster

Thanks tinstaafl!

It worked perfectly, I didn't realize I was missing !=0 in line 4.

<M/> 170 Why so serious? Featured Poster

(I am being honest, it is an assignment that I have attempted)

I have a question/assignment that requires me to do a for loop that counts to a specific number (i am using 25) and skips every number that is (for example) divisible by 3.

I have tried this:

int o;
      for (o = 1; o <= 25; o++)
          {
              if (o % 3)
              continue;
              Console.WriteLine(o);
          }

My solution didn't work, nor did google help me out that much... I know the answer is super simple and I am just missing it somehow because I am tired.

Thanks in advance.

<M/> 170 Why so serious? Featured Poster

Me too!

<M/> 170 Why so serious? Featured Poster

56.00000000000000000000000000000000000000000000000000000000000000000000000000000001

<M/> 170 Why so serious? Featured Poster

I am going to assume consltancy is the last word of the name

Yum Brands! (don't worry about the "!")

<M/> 170 Why so serious? Featured Poster

Because he felt like it.

Why was my birthday yesterday?

<M/> 170 Why so serious? Featured Poster

Welcome

<M/> 170 Why so serious? Featured Poster

Welcome!

<M/> 170 Why so serious? Featured Poster

Maybe the real problem is that young people (high school age and younger) just don't have enough experience using computers to know how to google for their questions. Sure they are well versed in how to play games and post in Facebook, but how to do something useful may be another matter.

@AD, i may need to counter that, I noticed that most people who ask questions like that are normally older (maybe in their 20s). But i do agree with you, lots of teens are lazy...

<M/> 170 Why so serious? Featured Poster

I went to a vegie restraunt to celebrate my b-day (the birthday was a day before but we celebrated it today). We had a sante fe sandwich (the chicken was tofu), fries, etc.

<M/> 170 Why so serious? Featured Poster

Ads and social media is a good start. Also SEO

<M/> 170 Why so serious? Featured Poster

Starbucks is overpriced and overrated. I'd rather have a cup of home brewed coffee for 1/10th the price of Starbucks and smells/tasts just as good.

That is true, but sometimes i am just in the mood for it.

<M/> 170 Why so serious? Featured Poster

Show some effort please, no one will ever help you if you post like that.

<M/> 170 Why so serious? Featured Poster

if you do ecommerce, try selling: templates, plugins, apps, merchandise, etc.

<M/> 170 Why so serious? Featured Poster

I had another starbucks frappe :)

<M/> 170 Why so serious? Featured Poster

@deceptikon, how did i know you were going to post that?

I ban you (deceptikon) for having a pony avatar!

<M/> 170 Why so serious? Featured Poster

Thanks for the birthday wishes you guys. You will be amazed on what i did for my b-day (i went to my college class and high school and i did homework the entire day! Yeppie!)

@ChrisHunter- Here is my b-day bunny (below)

(\/)
( '.')
c('')('')

@AD- February is a good month for b-days, but to be honest... all months are unique because of their events that they contain.

@Lucaci Andrew- wow... so you represent 7 billion people then? That is cool!

@LastMitch- well... I thought it was a good idea to mention births, deaths, and events... In other words people die everyday and people are born everyday, so might as well mention it. Also, I think i may need some more coffee ;)

@Dani- my dad shares the same b-day.

@JorgeM- thanks!

<M/> 170 Why so serious? Featured Poster

okay: django unchained, identity theif, lincoln, and a few others....

<M/> 170 Why so serious? Featured Poster

that one IT dude.

why am i a guy?

<M/> 170 Why so serious? Featured Poster

I ban you for accusing me of stealing Michael Jackson's name!

<M/> 170 Why so serious? Featured Poster

@Lucaci Andrew, I think just plain coffee is best... it is most nutritious.

<M/> 170 Why so serious? Featured Poster

@Lucaci Andrew, fortunately we have probably the best and sometimes most painful summers and autumn

<M/> 170 Why so serious? Featured Poster

55

<M/> 170 Why so serious? Featured Poster

i am going to assume that services is the last word of that mouthful company name

Sprint

<M/> 170 Why so serious? Featured Poster

liar ;)

<M/> 170 Why so serious? Featured Poster
<M/> 170 Why so serious? Featured Poster
<M/> 170 Why so serious? Featured Poster

I book marked it for future reading! (possibly during break at school).