<mosaic.cnfolio.com>
PROGRAM
  1. //start
  2. //go set counter to zero
  3. //get number of pidgey pokemons
  4. //get number of ratatat pokemons
  5. //get number of candies
  6. //calculate number of candies to pokemon
  7. //then calculate the eveloution
  8. //display the eveloution gained
  9. //calculate TOTAL eveloution
  10. //calculate total experiance gained
  11. //display the outcome
  12. //end
  13.  
  14.  
  15.  
  16. #include <stdio.h>
  17.  
  18. int main( void )
  19. {
  20.  
  21.  
  22. int noofpoke;
  23. int pidgey;
  24. int candypidgey;
  25. int pidgeotto;
  26. int ratatat;
  27. int candyrat;
  28. int xprat;
  29. int xppidgey;
  30. int xppidgeot;
  31. int totxpgained;
  32.  
  33.  
  34. printf("Hello welcome back!\n");
  35. printf("You have a lucky egg bonus timer\n ");
  36.  
  37. printf("How many Pokemon do you want to evolve?\n");
  38. scanf("%d",&noofpoke);
  39. printf("%d Pokemon\n",noofpoke);
  40. if (noofpoke >85)
  41. {printf("\nYou can not evolve above 85 pokemon while using a luckyegg ");
  42. }
  43. else
  44. {
  45. printf("\nHow many Pidgey are you evolving? ");
  46. scanf("%d",&pidgey);
  47. printf("\n%d Pidgey ",pidgey);
  48.  
  49. printf("\nHow many Pidgey candies do you have?\n");
  50. scanf("%d", &candypidgey);
  51. printf("%d Pidgey Candy\n",candypidgey);
  52. if(pidgey<=0 || candypidgey <=0)
  53. {printf("Values inputed must be more than, or equal to zero.\nExiting...\n");
  54. }
  55.  
  56. if (candypidgey >=12*pidgey)
  57. {printf("\nYou now have %d Pidgeotto Pokemon from your evolution", pidgey);
  58. printf("\nExperience gained is %d\n",xppidgey = pidgey*1000);
  59. }
  60. else
  61. {printf("\nYou donít have enough Pidgey candies to evolve all your Pidgey Pokemons\n");
  62. }
  63.  
  64. printf("\nHow many  Pidgeotto Pokemon do you want to evolve?");
  65. scanf("%d", &pidgeotto);
  66. printf("\n%d Pidgeotto \n",pidgeotto);
  67.  
  68. if(candypidgey >=50*pidgeotto)
  69. {printf("This is your final evolution of your Pidgey pokemon\n");
  70. printf("Experience gaine is %d\n", xppidgeot = pidgeotto * 1000);
  71. }
  72. else
  73. {printf("\nYou do not have enough Candy for your evolution\n");
  74. }
  75.  
  76. printf("\nHow many Ratat do you want to evolve?\n");
  77. scanf("%d",&ratatat);
  78. printf("%d Ratatat\n",ratatat);
  79.  
  80. printf("How many Ratatat candey do you have?\n");
  81. scanf("%d", &candyrat);
  82. printf("%d Ratatat candy\n",candyrat);
  83.  
  84.  
  85. if(candyrat >=25*ratatat)
  86. {printf("\nYou have now evolved your %d Ratatat into Raticate\n", ratatat);
  87. printf("Experience gaine is %d\n", xprat=ratatat * 1000);
  88. }
  89. else
  90. {printf("\nYou do not have enough Candy for your evolution\n");
  91. }
  92.  
  93. printf("\nThe total experience gained from all your evolutions is %d\n",totxpgained= xprat+xppidgey+xppidgeot);
  94.  
  95. }
  96. }