Thread: Pokemon - repost

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Your formatting still needs work.

    Also, you should explain your problem more clearly. Tell us what is the while() supposed to do, and how is it not working.

    "PossibleEvolutions" is never initialized, but used in several places. That is certainly one problem.

    If experience is only rewarded if the user enters the correct number of "candies" and "pidgeys", you should skip the experience calculations if one of these inputs is not a valid value. This is as simple as setting flags if either of those inputs is not valid, and skipping the experience calculation if either of those flags are set.

    Code:
    Exp = Pidgey*1000;
    printf("total exp with lucky egg was %d", Pidgey);
    Did you mean to use "Exp" in the printf()? Or maybe even "XPWithLuckyEgg"?
    Last edited by Matticus; 01-10-2017 at 06:35 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C program - pokemon
    By sureme in forum C Programming
    Replies: 4
    Last Post: 01-03-2017, 09:29 AM
  2. Binary Search Help Repost.
    By Sid_TheBeginner in forum C++ Programming
    Replies: 10
    Last Post: 06-29-2012, 03:58 PM
  3. Pokemon MMORPG?
    By FiftyNine50 in forum Projects and Job Recruitment
    Replies: 4
    Last Post: 07-25-2007, 04:05 PM
  4. repost: still stuggling w/for loop
    By learnin2program in forum C++ Programming
    Replies: 8
    Last Post: 02-19-2002, 07:19 PM
  5. Replies: 2
    Last Post: 09-10-2001, 12:00 PM

Tags for this Thread