Thread: Something missing in my code?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    157
    you may have to rethink your code as it only gets random numbers at the start program and uses these for the rest. also may i suggest that you use interrupts?

  2. #2
    Registered User
    Join Date
    Jan 2014
    Posts
    7
    Quote Originally Posted by africanwizz View Post
    you may have to rethink your code as it only gets random numbers at the start program and uses these for the rest. also may i suggest that you use interrupts?
    how should I change the code for it to produce a random number further down? I see what you mean though, as they are declared at the beginning they would be used for the display, however if the programme was re-run would it produce a different number? In relation to interrupts, I am yet to learn about them, please enlighten me? thank you for your time!

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    157
    Quote Originally Posted by kgriffiths1927 View Post
    however if the programme was re-run would it produce a different number? In relation to interrupts, I am yet to learn about them, please enlighten me?
    yes, and you would need to read up on interrupts on your own .

    first off, you would have to have some delay functions. Then generate a new number at the start of your for loop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 01-15-2013, 10:31 AM
  2. Replies: 2
    Last Post: 04-06-2012, 02:12 PM
  3. Replies: 22
    Last Post: 07-07-2006, 04:42 AM
  4. Need the missing line of code
    By mayhem in forum C Programming
    Replies: 3
    Last Post: 06-20-2005, 04:21 PM
  5. Am i missing something?
    By Chaplin27 in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-08-2005, 03:27 AM

Tags for this Thread