<mosaic.cnfolio.com>
PROGRAM
  1. /*
  2. START
  3.    READ input value 1 (Amount of Pidgey Pokemon)(Positive intergers)
  4.    READ input value 2 (Amount of Pidgey Candies)(Positive intergers)
  5.    
  6.       IF input 1 is less than 0 and input 2 is less than 12
  7.          
  8.          THEN
  9.             Produce error message requiring more Pidgey Pokemon (if input 1 is lower than 0)
  10.             Produce error message requiring more Pidgey Candy (if input 2 is lower than 12)
  11.             Enable ability to produce message if both error citerias met
  12.       ElSE
  13.      
  14.          WHILE Input 1 is greater than 0 and Input 2 is greater than 12
  15.                decrement input 1 by 1
  16.                decrease input 2 by 12
  17.                increment input 2 by 1
  18.                Increase XP for every evolution by 500
  19.  
  20.          END WHILE
  21.          
  22.          Dispplay Pokemon Type
  23.          Display amount of XP multiplied by 2
  24.          Display amount of candies remaining
  25.          Display amount of lucky eggs used
  26.          
  27.       END IF
  28. END     
  29. */
  30.  
  31. #include <stdio.h>
  32.  
  33. int main(   void  )
  34.  
  35. {
  36.    float Pokemon, Candy;
  37.    int XP = 0, egg = 0;
  38.    
  39.    scanf(" %f %f ", &Pokemon, &Candy); /* searches for two interger inputs */
  40.    
  41.    if( Pokemon<0 ){ /* when not <0 run error message */
  42.       printf("Error: Not Enough Pidgey Pokemon to calculate XP earned.\nPlease capture more Pidgey Pokemon");
  43.      
  44.    }
  45.  
  46.    if( Candy<12 ){  /* run error message if candy less than 12*/
  47.       printf("\n\nError: Not Enough Pidgey Candy to evolve.\nPlease collect more Candies.");
  48.       return 0; /*End program here if criteria for errors met */
  49.    }
  50.    
  51.    
  52.    else
  53.       while( Pokemon>0 && Candy>11 )  /* Decrease Pokemon by 1, Decrease 12 candy, add 1 candy for every evolution */
  54.       { 
  55.             Pokemon--;
  56.             Candy -=12;
  57.             Candy++;
  58.             XP+=500;
  59.             egg++;
  60.       }
  61.       printf("Pidgey Pokemon:\nXP earned %d\nCandy remaining %.0f\nLucky Eggs used %d", XP*2, Candy, egg/70); /* XP doubled and lucky egg average created */
  62. }