<mosaic.cnfolio.com>
PROGRAM
  1. /** |Pseudo Code|
  2.  
  3. * " int number_of_pidgey_pokemons = input();
  4. *   int candy = input()
  5. *     if(checkintegers() == false){
  6. *   print(error);
  7. *   return
  8. *   }
  9. *     else{
  10. *       do calculationOfXP;
  11. *   } "
  12. */
  13.  
  14.  
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17.  
  18. int calculateXP(int one , int two){
  19.    one = one / 12;
  20.    if(two > one){
  21.       two = one;
  22.    }else{
  23.       
  24.    }
  25.     return two * 1000;
  26. }
  27.  
  28. int main(void) {
  29.    
  30.     float temp3 = 0;
  31.    
  32.     float temp1 = 1.1; // this is temperary variables for the number_pidgey_pokemons
  33.     float diff1 = 0;
  34.    
  35.     float temp2 = 1.1; // and this one is the temperary variables for the candy_amount
  36.     float diff2 = 0;
  37.    
  38.     int number_of_pidgey_pokemons = 0;// as you can see here we are declaring and also initializing the variables
  39.     int candy_amount = 0;
  40.     int bonus_egg_time = 0;
  41.    
  42.     printf("Please enter the number of pidgey pokemons\n");
  43.     scanf("%f" , &temp1); // this is where both inputs will be inserted
  44.     printf("Please enter the candy amount\n");
  45.     scanf("%f" , &temp2);
  46.    
  47.     number_of_pidgey_pokemons = (int)temp1;
  48.     candy_amount = (int)temp2;
  49.     diff1 = temp1 - number_of_pidgey_pokemons;
  50.     diff2 = temp2 - candy_amount;
  51.    
  52.     if(diff1 != temp3 || diff2 != temp3){
  53.         printf("Invalid Input, Input must be integers\n");
  54.         return 0;
  55.     }
  56.    
  57.     bonus_egg_time = (int)(rand() % 100); //this would randomly assign bonus_egg_time
  58.    
  59. //    this part is calculating the XP & displaying the end result
  60.     printf("Maximum XP which can be earned is %d\n",calculateXP(candy_amount,number_of_pidgey_pokemons));
  61.    
  62.     return 0;
  63. }