<mosaic.cnfolio.com>
PROGRAM
  1. #include<stdio.h>
  2. /*
  3. START
  4. obtain the 4 input numbers
  5. IF
  6. the sum of pidgey candys if more than or equal to pidgey pokemons multiplied by 12
  7. THEN
  8. Display the total  experiance points of evolving pidgey pokemon using the lucy egg
  9. ELSE
  10. Display tryagain next time the player dont have enough candys
  11. END IF
  12. IF
  13. the sum of zubat candys if more than or equal to zubat pokemons multiplied by 50
  14. THEN
  15. Display the total  experiance points of evolving zubat using the lucy egg
  16. ELSE
  17. Display tryagain next time the player dont have enough candys
  18. END IF
  19. END*/
  20. int main(void)
  21. {
  22. int BP;
  23. int BC;
  24. int total;
  25. int T1;
  26. int ZP;
  27. int ZC;
  28. int Total2;
  29. int T2;
  30. /*pidgey pokemon calculation*/
  31.  
  32. printf("how many pidgey pokemones do you want to evolve?\n");
  33. scanf("%d",&BP);
  34. printf("how many pidgey candyes do you have?\n");
  35. scanf("%d" ,&BC);
  36. /*i multiplied by 12 because you need 12 candys to evolve one pidgey pokemon*/
  37. if (BC>=BP*12)
  38. {
  39. total=(BP*1000)*2;
  40. printf("the xp you earn using a lucky egg is %d\n" , total);
  41. }
  42. else
  43. {
  44. /*if the player dont have enough candys to evolve an error massage will apper with
  45. the number of candys the player need so he can evolve his/her pokemo */
  46. T1=(BP*12);
  47. printf("try again next time! you dont have enough piedgy candies to evolve , you need %d\n" , T1);
  48.  
  49. }
  50. /*Zubat calculations*/
  51.  
  52. printf("how many zubat pokemones do you want to evolve ?\n");
  53. scanf("%d",&ZP);
  54. printf("how many zubat candyes do you have?\n");
  55. scanf("%d" ,&ZC);
  56. /*its multiplied by 50 because you need 50 zubat candys to evolve one zubat into golbat*/
  57. if (ZC>=ZP*50)
  58. {
  59. /*you gain 1000 xp points but by using the lucyegg you get the douple ex because of
  60. that the xp is multiplied by 2*/
  61. Total2=(ZP*1000)*2;
  62. printf("the xp you earn using a lucky egg is %d" , Total2);
  63. }
  64. else
  65. {
  66. /*if the player dont have enough candys to evolve an error massage will apper with the number of
  67. candys the player need so he can evolve his/her pokemon*/
  68. T2=(ZP*50);
  69. printf("try again next time! you dont have enough zubat candies to evolve , you need %d\n" , T2);
  70.  
  71. }
  72.  
  73.  
  74. }