<mosaic.cnfolio.com>
PROGRAM
  1. /*
  2. START
  3. INPUT user inputs the amount of Pidgey Candies and how many Pidgey they have
  4.  
  5. STORE XP as 500
  6.  
  7. SCAN for the Pidgey Candies and Pidgey in integer values
  8.  
  9. STORE requirement for a Pidgey to evolve
  10.  
  11. STORE the value for maximum amount of xp gained from lucky egg xp of Pidgey by muliplying by eachother
  12.  
  13. STORE the value for maximum amount of xp gained from lucky egg xp of Pidgey Candies by multiplying eachother
  14.  
  15. IF amount of Pidgey is greater than or equals to 1
  16.    IF amount of Pidgey Candy is greater than or equals to 12
  17.       IF the maximum amount of Pidgey Candy XP is less than the maximum amount of Pidgey XP THEN
  18.          OUTPUT 'The total amount of XP that can be earned using a lucky egg is %d' (Integer of the maxium amount of Pidgey Candy XP)
  19.                   'The number of Pidgey that can be evolved is %d and the amount of extra candies you will recieve will be %d' (Integer of Pidgey Candy divided by 12)
  20.       ELSE
  21.          OUTPUT 'The total amount of XP that can be earned using a lucky egg is %d' (Integer of the amount of Pidgey divided by 1000)
  22.                   'The number of Pidgey that can be evolved is %d and the amount of extra candies you will recieve will be %d' (Integer of amount of Pidgey divided by 1000)
  23.    ELSE
  24.       OUTPUT 'There is not the required amount of candy to evolve a Pidgey'
  25. ELSE
  26.     OUTPUT 'You need to actually have a Pidgey to be able to evolve one'
  27. END
  28. */
  29.  
  30. #include <stdio.h>
  31.  
  32. int main(void)
  33. {
  34. int PidgeyCandy;
  35. int Pidgey;
  36. int xp=500;
  37.  
  38. scanf("%d %d", &Pidgey, &PidgeyCandy);
  39. int PidgeyEvolution = PidgeyCandy/12;
  40. int XPPidgey =(2 * xp * Pidgey);
  41. int XPCandy =(2 * xp * PidgeyEvolution);
  42.  
  43. if (Pidgey >=1) /* If amount of Pidgey is greater than 1, */
  44. {
  45.       if (PidgeyCandy >=12) /* and if amount of Pidgey Candy is greater than 12, */
  46.       {
  47.          if (XPCandy < XPPidgey) /* and then if whether amount of Pidgey Candy is less than Pidgey XP  */
  48.          {
  49.             printf("The total amount of XP that can be earned using a lucky egg is %d \n", (xp * 2 * PidgeyEvolution));
  50.             printf("The number of Pidgey that can be evolved is %d and the amount of extra candies you will recieve will be %d", PidgeyCandy/12); /* Prints this if it is less */
  51.      }
  52.          else
  53.          {
  54.             printf("The total amount of XP that can be earned using a lucky egg is %d \n", XPPidgey);
  55.             printf("The total number of Pidgey that can be evolved depending on the number of Pidgey is %d and the amount of extra candies you will recieve will be %d", XPPidgey/1000); /* Prints this if it isn't less */
  56.          }
  57.       }
  58.       else
  59.          {
  60.             printf("There is not the required amount of candy to evolve a Pidgey"); /* Prints this if amount of Pidgey Candy is not greater than 12 */
  61.          }
  62.          }
  63. else
  64.    {
  65.       printf("You need to actually have a Pidgey to be able to evolve one"); /* Prints if amount of Pidgey is less than 1 */
  66.    }
  67.    
  68. }