Date: Mon, 6 Dec 1999 13:30:46 -0500 Message-Id: <199912061830.NAA21908@envy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <82gnhb$dm2$1@imsp026.netvigator.com> (manman@netteens.net) Subject: Re: Pls help!! References: <82gnhb$dm2$1 AT imsp026 DOT netvigator DOT com> Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > printf("How much is %d times %d? ",1+(rand()%9),1+(rand()%9)); > ans=(1+(rand()%9))*(1+(rand()%9)); this code generates four random numbers. What you need to do is something like this: a = 1 + (rand()%9); b = 1 + (rand()%9); printf("How much is %d times %d? ", a, b); ans = a * b;