Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   can anyone write a multiplication program (http://www.go4expert.com/forums/write-multiplication-program-t2430/)

derby20uk 3Jan2007 20:21

can anyone write a multiplication program
 
Can anyone here write a program in turbo C++

Its a multiplication and division game needs to be 2-10 times tables

E.g 9 x 2 =?
57 / 7 = ?

The program needs to generate random numbers in the required range 2-10 and also randomly decide whether to offer a multiplication or division problem.

No answer should ahve a remainder

The user should be given the opportunity to provide an answer which is checked by the program and if it write it should congratulate the user

The user should have 6 tryes before thier turn is ended and at the end it should display the user score

ive be graitful if anyone can do this and post the code

shabbir 4Jan2007 07:00

Re: can anyone write a multiplication program
 
This forum is not for getting the assignments / homework done but if you have some queries you can discuss.

derby20uk 10Jan2007 20:19

Re: can anyone write a multiplication program
 
this is not for a assignment. ive been playing around with turbo C++. I can write a simple multiplication program. but i cant work out how to write a program to divide without leaving a remainder. could someone write a sample code so show me.

DaWei 10Jan2007 20:41

Re: can anyone write a multiplication program
 
Think about and rephrase your question. Integers which aren't evenly divisible by another integer leave remainders. There's nothing that prevents you from ignoring them, however. Floating point divisions may generate fractional components, some of which do not terminate this side of infinity.

Deviating from your actual topic, I would suggest that you investigate a more modern compiler, presuming that your system is not ancient. There are many good free alternatives.


All times are GMT +5.5. The time now is 10:11.