<mosaic.cnfolio.com>
PROGRAM
  1. /* Pseudo code */
  2.  
  3. /*START
  4.   WHILE number of pidgey is greatter than 0 and number of candy is greatter than 12
  5.      number of pidgey decreases with 1
  6.      number of candy decreases with 11
  7.      number of xp1 increases with 2000
  8.      when the number of pidgey or candy reach 0 shows the total xp
  9.   END WHILE
  10.     IF the sum of xp and xp1 is lower or equal to 0
  11.        shows "error:missing input values!The total xp is 0."
  12.     END IF
  13. END */
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. #include <stdio.h>
  22. int main ( void )
  23. {
  24.   int pidgey, candy, xp=0, xp1;
  25.  
  26.   scanf( "%d %d", &pidgey, &candy );
  27.   {
  28.      
  29.      while ( pidgey > 0, candy > 12 )
  30.      {
  31.         pidgey=pidgey - 1;
  32.         candy=candy - 11;
  33.         xp1=xp1 + 2000;
  34.      }   
  35.    if (xp + xp1 <=0)
  36.       printf("error:missing input values!");
  37.      
  38.   }
  39.    
  40.     printf( "The total xp is %d", xp + xp1 );
  41.    }