Thread: Error: invalid operand to binary %

  1. #16
    Registered User
    Join Date
    Jul 2006
    Posts
    111
    Ok I get it now, and it now works! Thanks for the help. Should I use htis meathod of input instead of scanf for everyhting? Also, if I may ask, how would you allow it to calculate for numbers with many, many numbers? I notice after a certain number of digits it just simply returns prime. Anyway, t hankyou for the help.

  2. #17
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by lilrayray
    Should I use htis meathod of input instead of scanf for everyhting?
    Yes.
    User Input: Strings and Numbers [C] (this has links to this FAQ as well)
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. arrays vs lists? And containers in general!
    By clegs in forum C++ Programming
    Replies: 22
    Last Post: 12-03-2007, 02:02 PM
  2. Replies: 0
    Last Post: 11-04-2006, 11:07 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 09:40 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM