<mosaic.cnfolio.com>
PROGRAM
  1. /*Take user input and store it in suitable variables.
  2. Print the user input.
  3. Calculate the maximum amount of xp and pokemon(s) that can be evolved.
  4. Print the maximum xp and pokemon(s) that can be evolved.*/
  5.  
  6.  
  7.  
  8. /*
  9. start
  10. define main function
  11.  
  12. define Integer noOfPidgey
  13. define Integer noOfCandy
  14. define Integer candiesForEvolving <- 12
  15.  
  16. noOfPidgey <- user_input
  17. noOfCandy <- user_input
  18.  
  19. if evolvable number of pidgeys from user candy is less than or equal to number of pidgey(s) user has:
  20.  
  21. print evolvable number of pidgeys from user candy
  22.  
  23. print evolvable no. of pidgeys *2000
  24.  
  25. else :
  26.  
  27. print maximum evolvable no. of pidgeys *2000
  28.  
  29. end
  30. */
  31.  
  32.  
  33.  
  34. #include <stdio.h>
  35.  
  36. int main(void){
  37.  
  38. int noOfPidgey;
  39. int noOfCandy;
  40. int candiesForEvolving = 12;
  41.  
  42. printf("No of Pidgey you currently have: ");
  43. scanf("%d", &noOfPidgey);
  44. printf("%d", noOfPidgey);
  45. printf("\nNo of candy you have for pidgey: ");
  46. scanf("%d", &noOfCandy);
  47. printf("%d",noOfCandy);
  48.  
  49. if(noOfCandy/candiesForEvolving <= noOfPidgey){
  50. printf("\n Maximum number of evolvable pidgey: %d", noOfCandy/candiesForEvolving);
  51. printf("\n Maximum xp that can be earned: %d", (noOfCandy/candiesForEvolving)*2000);
  52.  
  53. }
  54. else{
  55. printf("\n Maximum xp that can be earned: %d", (noOfCandy/candiesForEvolving)*2000);
  56. }
  57.  
  58. }