Directory: C

C++ and my simple lottery program; problems with WHILE?

Hi! I'm a C++ newbie and I'm still not that good in making even the simplest things. I made this lottery program with the help of the internet, and everything works fine, except somehow I can't seem to be able to make a working WHILE loop.

Basically I don't want to have 2 of the same numbers win the raffle, so I tried to use "while" to make sure all of them are different. It's this part I have problems with:

while(p==q || q==e || p==e)
{
srand (time(NULL));
int q = 1 + rand() % num;
int p = 1 + rand() % num;
int e = 1 + rand() % num;
}

It just won't do what I ask it to do.

Can my computer run it?

I was wondering if my Laptop can hand Grand theft auto San Andreas

Toshiba Satellite C55-A Intel Core i3-3120m cpu 2.50GHz

6gb memory 750gb hard drive

64-bit operating system, x64-based processor

Intel HD Graphics 4000

Computer crashes if I add more than 6GB RAM?

I have an EVGA X58 SLI system board. The memory slots are black, gray, black, gray, black, gray.
I have 3 2GB sticks of CORSAIR xms3 1600MHz memory, in the gray slots. I bought 6 more gigs, exact same kind, and it's all good, I can swap it out with my existing memory, and it works fine. But if I try filling up any or all of the black slots with the same kind of memory, I get blue screens. Does anyone know what could be causing this?

Can anybody tell me what font this tattoo is?

https://fbexternal-a.akamaihd.net/safe_image.php?d=AQDvN6hbc4G5ooOq&w=37...

change a picture so you can not tell its us?

I have a picture of my ex and I doing a swing dance dip. I love the picture but obviously I can not go around using pictures of my ex. how can I change the picture so you can not tell it is us but you can still see the picture.

Can I audition for a role if I live in venezuela but was born in United States?

Ok, so I'll go to la with my mom on vacations, and I'm only 14 turning to 15 on September, so all my life I've wanted to be a famous actress and I was actually born in the USA were i want to live but my parents are from Venezuela and I'm living here bc of a long and shitty story so my question is can i do castings and actually get a role if I audition?

More on hypeanswer.com

    More on Wikipedia

    Answers

    News

      Syndicate content