<mosaic.cnfolio.com>
PROGRAM
  1. /*
  2. START
  3.  
  4.     DECLARE VARIABLES Pidgey, Experience, Candys, OverallExperience, CandyEvolutions, PossibleEvolutions
  5.     INITIALIZE Experience TO 1000
  6.  
  7.     SCAN FORMATTED "Number Formatting" (%d %d), Candys AND Pidgey
  8.  
  9.     INITIALIZE CandyEvolutions TO Candys / 12
  10.    
  11.     IF Candys is LARGER THAN 840 AND Pidgey is LARGER THAN 70
  12.         THEN
  13.           PRINT "Warning: You can only make 69 evolutions (69000 experience) with one lucky egg!\nHere is what you can earn with multiple lucky eggs:\n"
  14.    END IF
  15.    
  16.     IF Pidgey value equals 0 OR Candy value equals 0
  17.         THEN
  18.             PRINT "You have entered 0, this is not a valid value \n"
  19.     END IF
  20.          
  21.     IF CandysEvolutions IS LESS THAN Pidgey AND Candys DOES NOT EQUAL 0 AND Pidgey DOES NOT EQUAL 0
  22.         THEN
  23.           OverallExperience TO CandyEvolutions * 1000
  24.           PRINT "You will Earn %d Experience\n" + OverallExperience
  25.           PRINT "You can Evolve %d Pidgeys!" + CandyEvolutions
  26.     END IF
  27.  
  28.     IF CandysEvolutions IS LARGER THAN Pidgey
  29.         THEN
  30.           OverallExperience TO Pidgey * 1000
  31.           PRINT "You can Evolve %d Pidgeys\n" + Pidgey
  32.           PRINT "You will receive %d Experience!" + OverallExperience
  33.     END IF
  34.    
  35.     IF CandyEvolutions IS EQUAL TO Pidgey
  36.         THEN
  37.           OverallExperience TO Pidgey * 1000
  38.           PRINT "You will earn %d Experience\n" + OverallExperience
  39.           PRINT "You can evolve %d Pidgeys!" + CandyEvolutions
  40.     END IF
  41.  
  42. END
  43. */
  44.  
  45.  
  46. #include <stdio.h>
  47.  
  48.  
  49. int main ( void )
  50. {
  51.  
  52. int Pidgey;
  53. int Experience=1000;
  54. int Candys;
  55. int OverallExperience;
  56. int CandyEvolutions;
  57. int PossibleEvolutions;
  58.  
  59. scanf ("%d %d" , &Candys , &Pidgey );
  60.  
  61. CandyEvolutions = Candys/12;
  62.  
  63. if ((Candys >840) && (Pidgey >70))
  64. {
  65. printf ("Warning: You can only make 69 evolutions (69000 experience) with one lucky egg!\nHere is what you can earn with multiple lucky eggs:\n");
  66. }
  67.  
  68. if ((Pidgey==0) || (Candys==0))
  69. {
  70.    printf ("You have entered 0, this is not a valid value \n");
  71. }
  72.  
  73. if ((CandyEvolutions < Pidgey) && (Candys != 0) && (Pidgey != 0))
  74. {
  75. OverallExperience = CandyEvolutions * 1000;
  76.  
  77. printf ("You will Earn %d Experience\n" , OverallExperience);
  78. printf ("You can Evolve %d Pidgeys!" , CandyEvolutions);
  79. }
  80.  
  81. if ((CandyEvolutions > Pidgey))
  82. {
  83. OverallExperience = Pidgey * 1000;
  84. printf ("You can Evolve %d Pidgeys\n", Pidgey);
  85. printf ("You will recieve %d Experience!", OverallExperience);
  86. }
  87.  
  88. if (CandyEvolutions == Pidgey)
  89. {
  90. OverallExperience = Pidgey*1000;
  91. printf ("You will earn %d Experience\n" , OverallExperience);
  92. printf ("You can evolve %d Pidgeys!" , CandyEvolutions);
  93. }
  94.  
  95.  
  96.  
  97. }