<mosaic.cnfolio.com>
PROGRAM
1. /*
2. Pseudo Code
3. START
4. Ask user for number of pidgey pokemons
5. Ask user for number of pidgey candies
6.
7. IF user enters non interger values for either pigey pokemons or pidgey candies
8. Then
9. Display please enter interger values
10. End IF
11.
12.
13. If user enters negative intergers values for pidgey pokemons
14. Then
15. Display please enter positive interger values
16. End IF
17.
18. If user enters negative intergers values for pidgey candies
19. Then
20. Display please enter positive interger values
21. End IF
22.
23. If (Pidgey Pokemon ==0)
24. Then
25. Display no pokemons available for an evolution
26. End if
27.
28. IF pidgey candy is more than or equal to 12
29. Then
30. calculate and display the number of evolutions
31. ELSE
32. Display you require a minimum of 12 candies in order to evolve
33. End if
34.
35. If Pidgey pokemons < evolutions
36. Then
37. calculate XP for pidgeypokemons
38. calculate XP for Lucky Egg timer bonus
39. Else
40. calculate XP for evolutions
41. calculate XP for Lucky Egg timer bonus
42. End if
43.
44. */
45.
46.
47. #include <stdio.h>
48. int main(void)
49. {
50.
51. int pidgeycandy;
52. int pidgeypokemon;
53. int evolve;
54. int input_result;
55. scanf("%d %d", &pidgeypokemon, &pidgeycandy);
56.
57.
58. /*Set variable  call to scanf*/
59. input_result = scanf("%d %d", &pidgeypokemon,&pidgeycandy);
60.
61. /*Checks if variable entered is true or false (an interger value) */
62. if(input_result == 0)
63. {
64. printf("please enter an integer vaule \n");
65.    }
66.
67.
68. /*calucaltion for number of evolutions*/
69. evolve=(pidgeycandy+1)/11;
70.
71. /*error message for negative values*/
72.
73. if(pidgeycandy <0)
74.
75. printf("please enter a positive interger value for pideycandies\n");
76.
77. if(pidgeypokemon <0)
78.
79. printf("please enter a positive interger value for pidgeypokemons\n");
80.
81. /*displays the number of evolutions possible*/
82. if(pidgeycandy >=12)
83.
84. printf("the number of evolutions is %d\n", evolve);
85. /* Error message for an insufficient amount of pidgeycandies*/
86. else
87. {
88.     printf("you require a minimum of 12 pidgeycandies in order to evolve\n");
89.       }
90.
91. /*calculates total xp and total xp using a lucky egg timer from evolutions or pidgey pokemons
92. (depends on input values) */
93.
94. if(pidgeypokemon < evolve)
95. {
96. printf("the Xp for evolved pidgeys is %d \n", pidgeypokemon*500);
97. printf("the Xp after Lucky Egg Timer Bonus is %d \n", pidgeypokemon*500*2);
98. }
99.
100. else
101.
102. {
103. printf("the Xp for evolved pidgeys is %d \n", evolve*500);
104. printf("the Xp after Lucky Egg Timer Bonus is %d \n", evolve*500*2);
105. }
106.
107. }