<mosaic.cnfolio.com>
PROGRAM
  1. /*
  2. PSEUDO CODE
  3. START
  4.           Ask for number of pidgeys and pidgey candies
  5.           Ask for number of squirtles and squirtle candies
  6.           Ask for number of zubats and zubat candies
  7.           Obtain all the information being asked for in the respective order
  8.           IF pidgey number is greater than zero and the pidgey candies is greater than or equal to zero
  9.              THEN
  10.                       IF number of pidgey candies is less than 12
  11.                          THEN
  12.                                  Display number of pidgey candies needed for an evolution
  13.                          ELSE
  14.                                  IF (pidgey candy number - 1) divided by 11 is greater than or equal to pidgeys
  15.                                     THEN
  16.                                            Display maximum number of possible evolution
  17.                                            Display amount of candy that will remain
  18.                                            Display the total pidgey evolution time
  19.                                            Display the XP gained from evolving
  20.                                            Display recommendation for number of lucky eggs to use
  21.                                      ELSE
  22.                                            IF (pidgey candies - 1) divided by 11 is less than pidgeys
  23.                                               THEN
  24.                                                        Display maximum number of possible evolution
  25.                                                        Display amount of candy that will remain
  26.                                                        Display the total pidgey evolution time
  27.                                                        Display the XP gained from evolving
  28.                                                        Display recommendation for number of lucky eggs to use
  29.                                              END IF
  30.                                    END IF
  31.                      END IF
  32.                      ELSE
  33.                             Display message that no pidgeys will evolve
  34.           END IF___                                       
  35.           IF squirtle number is greater than zero and the squirtle candies is greater than or equal to zero
  36.              THEN
  37.                       IF number of squirtle candies is less than 25
  38.                          THEN
  39.                                  Display number of squirtle candies needed for an evolution
  40.                          ELSE
  41.                                  IF (squirtle candies - 1) divided by 24 is greater than or equal to pidgeys
  42.                                     THEN
  43.                                            Display maximum number of possible evolution
  44.                                            Display amount of candy that will remain
  45.                                            Display the total pidgey evolution time
  46.                                            Display the XP gained from evolving
  47.                                            Display recommendation for number of lucky eggs to use
  48.                                     ELSE
  49.                                            IF (squirtle candies -1) divided by 24 is less than squirtles
  50.                                               THEN
  51.                                                        Display maximum number of possible evolution
  52.                                                        Display amount of candy that will remain
  53.                                                        Display the total pidgey evolution time
  54.                                                        Display the XP gained from evolving
  55.                                                        Display recommendation for number of lucky eggs to use
  56.                                              END IF
  57.                                    END IF
  58.                      END IF
  59.                      ELSE
  60.                             Display message that no squirtles will evolve
  61.       END IF___   
  62.      
  63.        IF zubat number is greater than zero and the zubat candies is greater than or equal to zero
  64.              THEN
  65.                       IF number of zubat candies is less than 50
  66.                          THEN
  67.                                  Display number of zubat candies needed for an evolution
  68.                          ELSE
  69.                                  IF (zubat candies 1) divided by 49 is greater than or equal to zubats
  70.                                     THEN
  71.                                            Display maximum number of possible evolution
  72.                                            Display amount of candy that will remain
  73.                                            Display the total pidgey evolution time
  74.                                            Display the XP gained from evolving
  75.                                            Display recommendation for number of lucky eggs to use
  76.                                     ELSE
  77.                                            IF (zubat candies -1) divided by 11 is less than zubats
  78.                                               THEN
  79.                                                        Display maximum number of possible evolution
  80.                                                        Display amount of candy that will remain
  81.                                                        Display the total pidgey evolution time
  82.                                                        Display the XP gained from evolving
  83.                                                        Display recommendation for number of lucky eggs to use
  84.                                              END IF
  85.                                    END IF
  86.                      END IF
  87.           END IF___ 
  88.           IF any input is negative
  89.    THEN
  90.            Display message that no input should be negative
  91.           END IF
  92. END                                                                                                                           */
  93.  
  94.  
  95. #include <stdio.h>
  96.  
  97. int main( void )
  98. {
  99.   int PG, C;  /* PG = number of pidgeys, C = amount of pidgey candy */
  100.   int Sq, SC; /* Sq= number of squirtles, SC = amount of squirtle candy */
  101.   int Zb, ZC; /* Zb = number of zubats, ZC = amount of zubat candy */
  102.  
  103. printf( " Enter number of pidgeys and pidgey candies \n" );
  104. scanf( " %d %d ", &PG, &C );
  105.  
  106. printf( " Enter number of squirtles and squirtle candies \n" );
  107. scanf( " %d %d ", &Sq, &SC );
  108.  
  109. printf( " Enter number of zubats and zubat candies \n" );
  110. scanf( " %d %d ", &Zb, &ZC );
  111. printf( "\n");
  112.  
  113. if( PG>0 && C>=0 )
  114. {
  115.   if( C<12 )
  116.    {
  117.     printf( " You need %d more pidgey candies for a pidgey to evolve \n", 12-C );
  118.     printf( "\n" );
  119.    }
  120.  else if( (C-1)/11 >= PG )
  121.          {
  122.           printf( " Number of pidgeys that will evolve: %d \n", PG );
  123.           printf( " You will have %d pidgey candies left \n", C-(11*PG) );
  124.           printf( " It will take %.2f minutes for the pidgeys to evolve \n", 0.35*PG );
  125.           printf( " You will gain %d XP \n", 1000*PG );
  126.           printf( " I recommend using %d lucky eggs \n", PG/86 );
  127.           printf( " \n " );
  128.          }
  129.  else if( (C-1)/11 < PG )
  130.          {
  131.           printf( " Number of pidgeys that will evolve: %d \n", (C-1)/11  );
  132.           printf( " You will have %d candies left \n", C-(11*((C-1)/11)) );
  133.           printf( " It will take %.2f minutes for the pidgeys to evolve \n", 0.35*( (C-1)/11)  );
  134.           printf( " You will gain %d XP \n", 1000*( (C-1)/11 ) );
  135.           printf( " I recommend using %d lucky eggs \n", ((C-1)/11)/86 );
  136.           printf( " \n" );
  137.          }
  138.  
  139. }
  140. else
  141.    {
  142.     printf( " No pidgeys will evolve\n" );
  143.     printf( "\n" );
  144.    }
  145.  
  146. if( Sq>0 && SC>=0 )
  147. {
  148.   if( SC<25 )
  149.    {
  150.     printf( " You need %d more squirtle candies for a squirtle to evolve \n", 25-SC );
  151.     printf( " \n" );
  152.    }
  153.  else if( (SC-1)/24 >= Sq )
  154.          {
  155.           printf( " Number of squirtles that will evolve: %d \n", Sq );
  156.           printf( " You will have %d squirtle candies left \n", SC-(24*Sq) );
  157.           printf( " It will take %.2f minutes for the squirtles to evolve \n", 0.35*Sq );
  158.           printf( " You will gain %d XP \n", 1000*Sq );
  159.           printf( " I recommend using %d lucky eggs \n", Sq/86 );
  160.           printf( " \n" );
  161.          }
  162. else if( (SC-1)/24 < Sq )
  163.         {
  164.          printf( " Number of squirtles that will evolve: %d \n", (SC-1)/24  );
  165.          printf( " You will have %d squirtle candies left \n", SC-(24*((SC-1)/24)) );
  166.          printf( " It will take %.2f minutes for the squirtles to evolve \n", 0.35*((SC-1)/24)  );
  167.          printf( " You will gain %d XP \n", 1000*((SC-1)/24)  );
  168.          printf( " I recommend using %d lucky eggs \n", ((SC-1)/24)/86 );
  169.          printf( " \n" );
  170.         }
  171. }
  172. else
  173.     {
  174.      printf( " No squirtles will evolve\n" );
  175.      printf( "\n" );
  176.     }
  177.    
  178. if( Zb>0 && ZC>=0 )
  179. {
  180.   if( ZC<50 )
  181.    {
  182.     printf( " You need %d more zubat candies for a zubat to evolve \n", 50-ZC );
  183.     printf( " \n" );
  184.    }
  185.  else if( (ZC-1)/49 >= Zb )
  186.          {
  187.           printf( " Number of Zubats that will evolve: %d \n", Zb );
  188.           printf( " You will have %d zubat candies left \n", ZC-(49*Zb) );
  189.           printf( " It will take %.2f minutes for the zubats to evolve \n", 0.35*Zb );
  190.           printf( " You will gain %d XP \n", 1000*Zb );
  191.           printf( " I recommend using %d lucky eggs \n", Zb/86 );
  192.           printf( " \n" );
  193.          }
  194. else if( (ZC-1)/49 < Zb )
  195.          {
  196.           printf( " Number of zubats that will evolve: %d \n", (ZC-1)/49   );
  197.           printf( " You will have %d zubat candies left \n", ZC-(49*((ZC-1)/49) ) );
  198.           printf( " It will take %.2f minutes for the zubats to evolve \n", 0.35*( (ZC-1)/49 )  );
  199.           printf( " You will gain %d XP \n", 1000*( (ZC-1)/49 )  );
  200.           printf( " I recommend using %d lucky eggs \n", ( (ZC-1)/49 )/86 );
  201.           printf( " \n" );
  202.          }
  203. }
  204. else
  205.    {
  206.     printf( " No zubats will evolve\n" );
  207.     printf( "\n" );
  208.    }
  209.  
  210. if( PG<0 || C<0 || Sq<0 || SC<0 || Zb<0 || ZC<0 )
  211.   {
  212.     printf( " Make sure that all inputs are positive \n" );
  213.   }
  214. }