<mosaic.cnfolio.com>
PROGRAM
  1. /*Start
  2.  
  3. Take amount of pidgeys and candys player has
  4. IF the value of pidgey is less than 1
  5.    THEN display an error message
  6. IF the value of candy is less than 12
  7. THEN display an error message
  8.  
  9. IF candy divided by 12 is more than the amount of pidgey 
  10.    THEN display the amount of times you can evolve as pidgey amount
  11.    ELSE display the amount of times you can evolve as candy/12 amount
  12.    END IF
  13.  
  14.  
  15. End*/
  16.  
  17.  
  18.  
  19. #include <stdio.h>
  20.  
  21. int main (void){
  22.  
  23. int pidgey, candy, total;
  24.  
  25. scanf("%i %i", &pidgey, &candy);
  26.  
  27. if (pidgey <1){
  28. printf("Error, inputs incorrect\n");
  29. return('0');}
  30.  
  31. if (candy <12){
  32. printf("Error, inputs incorrect\n");
  33. return('0');}
  34.  
  35. if (candy/12 > pidgey){
  36. total = pidgey*1000;
  37. printf("You can evolve the pidgey %i times\nYou can get %i XP using lucky eggs", pidgey, total);}
  38.  
  39. else printf("You can evolve the pidgey %i times\nYou can get %i XP using lucky eggs", candy/12, candy/12*1000);
  40. }