<mosaic.cnfolio.com>
PROGRAM
  1. /* Final code */
  2.  
  3.  
  4.  
  5.  
  6. /* START
  7.  
  8. Set Number of Pidgeys and Number of Candies as integers (whole numbers)
  9.  
  10. Ask for the ‘number of Candies ’ the user has
  11. Look for the user’s input
  12.  
  13. IF This number is less than or equal to 12
  14.  
  15.       THEN
  16.          Display message ‘You do not have Candies to evolve X Pidgeys’
  17.  
  18.       ELSE
  19.          Display message “You do not have enough Candy to evolve a single Pidgey”
  20.  
  21.    
  22.    Ask for number of Pidgeys the user have
  23.    Look for the user’s input
  24.    
  25.       IF this number is greater than 0
  26.  
  27.          THEN
  28.             Display message “You have X Pidgeys”
  29.          
  30.          ELSE
  31.             Display message “You don’t have any Pidgeys, get out there and catch some!”
  32.  
  33.  
  34. Look for number of Pidgeys
  35.    
  36. Print message “ XP gained ‘X’!) Where X is number of Pidgeys multiplied by 500
  37.  
  38. Print message “With  a lucky egg you would earn ‘X’ XP” Where X is original XP             multiplied by 2”
  39.  
  40.    
  41. END */
  42.       
  43.  
  44.  
  45. #include <stdio.h>
  46.  
  47.  
  48. int main( void )
  49. {
  50.    int N_Candies, N_Pidgies; /* Set data type to integer, N_Cnadies for number of candies and N_Pidgies for number of Pidgies */
  51.  
  52.       printf("Please enter the number of Candies you have: "); /* Ask for user to input number of Candies */
  53.       scanf( "%d", &N_Candies ); /* Read value of N_Candies enterd as a decimal */
  54.    
  55.         if  ( N_Candies >= 12 ) /* Check if value is greater or equal to 12 ( Number needed for 1 evolution) */
  56.  
  57.             printf( "You have enough Candies to evolve %d pidgeys. \n", N_Candies/12  ); /* Inform user they have enough candies to evolve 'x' amount of Pidgies */ 
  58.        
  59.          else
  60.        {
  61.             printf ("You do not have enough Candy to evolve a single Pidgy! Better catch some more Pidgeys!");
  62.        }
  63.  
  64.          printf("Please enter the number of pidgeys you have:  ");
  65.          scanf( "%d", &N_Pidgies );
  66.    
  67.          if ( ( N_Pidgies > 0 ) )
  68.             printf("You have %d Pidgeys.\n ");
  69.     
  70.         else
  71.         {
  72.             printf ("You don't have any Pidgeys, get out there and catch some!");
  73.         }
  74.          scanf("%d", &N_Pidgies );
  75.          printf("XP gained %d!\n", N_Pidgies*500);
  76.          printf("With a lucky egg you would earn %d XP", (N_Pidgies*500)*2);
  77. }