<mosaic.cnfolio.com>
PROGRAM
  1. /*
  2. Start
  3. input number of pokemon and candies and leave evolutions to equal 0
  4.    if pokemon is less than 1 or candies is less the 12
  5.    display "error"
  6. End if
  7.    while pokemon if equal to or bigger then 1 and candies are equal to or bigger then 12
  8.    minus 1 off pokemon
  9.    minus 12 off candies
  10.    add 1 to evolutions
  11.    add 1 to candies
  12. display number of evolutions muiltyplie 500 xp
  13.    If number of evolutions is under or equal to 75
  14. display number of 2 multiply evolutions multiply 500 xp with lucky egg
  15. END if
  16.    If number of evolutions is bigger the 75
  17. display evolutions multiply 500 minus 37500 xp after lucky egg has hun out
  18. END if
  19.    If number of evolutions is bigger or equal to 75
  20. display evolutions multiply 500  minus 37500 plus 75000 combined xp with lucky egg
  21. END if
  22.  
  23. END
  24. */
  25.  
  26. #include <stdio.h>
  27.  
  28. int main( void )
  29. {
  30.  int pokemon, candies, evolutions=0;
  31.  scanf( "%d" "%d", &pokemon, &candies); /* only taking input data from pokemon and candies */
  32.  if (pokemon <1 || candies <12) /* 1 pokemon is the least amount for evolution while 12 candies is least amount to allow evolution */
  33.  printf("Error no pidgeys or candies        ");
  34.  while (pokemon>=1 && candies>=12)
  35.  {
  36.  scanf( "%d" "%d" "%d", &pokemon, &candies, &evolutions);
  37.  pokemon--;
  38.  candies-=12;
  39.  evolutions++;
  40.  candies++;
  41.  }   /* this allows for every evolution to take place as long as there is 1 pokemon and 12 candies, while with every evolution 1 candy can be created */
  42.  printf("number of evolutions %d", evolutions);
  43.  if (evolutions <= 75) /* 75 evolutions and pokemon transfers can happen with in the 30 minuets that a lucky egg is active */
  44.  printf("      xp %d with lucky egg", 2*evolutions*500);
  45.  if (evolutions > 75) /* this was used to calculate how much xp you would get after the lucky egg ran out with no previous xp from lucky egg */
  46.  printf("      xp %d after lucky egg has run out", evolutions*500-37500);
  47.  if (evolutions >= 75) /* this was so u could see the total xp from both lucky egg and after the egg had ran out */
  48.  printf("      combined xp with lucky egg %d", evolutions*500-37500+75000);
  49.  
  50.  }