<mosaic.cnfolio.com>
PROGRAM
1. /*START
2.
3.    SET Pidgeys and Candies to INTEGER values
4.    SET the MINIMUM value of Pidgeys required
5.    SET the MINIMUM value of Candies required
6.    READ the input values and ASSIGN them to Pidgeys and Candies
7.    SET P to equal Pidgeys minus 1
8.    SET C to equal Candies minus 12
9. if
10.    the number of Pidgeys and or Candies is LESS THAN their minimum values required
11.    DISPLAY the message, You don't have enough Pidgeys and or Candies to evolve.
12. if
13.    the number of Pidgeys and Candies is EQUAL TO their minimum values required
14.    DISPLAY the message, You have gained 1000XP but have 0 Pidgeys and 0 Candies remaining.
15. if
16.    the number of Pidgeys is MORE THAN the minimum value and the number of Candies is EQUAL TO the minimum value
17.    DISPLAY the message, You have gained 1000XP but have %d Pidgeys and 0 Candies remaining.
18. if
19.    the number of Pidgeys is EQUAL TO the minimum value and the number of Candies is MORE THAN the minimum value
20.    DISPLAY the message, You have gained 1000XP but have %d Pidgeys and 0 Candies remaining.
21. if
22.    the number of Pidgeys and Candies is MORE THAN the minimum values required
23.    DISPLAY the message, You have gained 1000XP but have %d Pidgeys and %d Candies remaining.
24. if
25.    the number of Pidgeys and Candies is MORE THAN the minimum values required
26.    DISPLAY the message, Please input your remaining Pidgey and Candy values to see if more XP can be gained.
27.
28. END*/
29.
30. #include <stdio.h>
31.
32. /* Stating that the main function doesnt use any data from memory */
33. int main (void)
34.
35. {
36. /* Pidgeys and Candies are set as integer values */
37. int Pidgeys, Candies;
38. /* The minimum amount of Pidgeys is set to the value of 1 */
39. int Pminimum = 1;
40. /* The minimum amount of Candies is set to the value of 12 */
41. int Cminimum = 12;
42.
43.    scanf ("%d %d", &Pidgeys, &Candies);
44.
45. /* P is set to the value of Pidgeys minus 1 */
46.    int P = Pidgeys-1;
47. /* C is set to the value of Candies minus 12 */
48.    int C = Candies-12;
49. {
50.    if ((Pidgeys<Pminimum)||(Candies<Cminimum))
51.    printf ("You don't have enough Pidgeys and or Candies to evolve.");
52. }
53. {
54.    if ((Pidgeys==Pminimum)&&(Candies==Cminimum))
55.    printf ("You have gained 1000XP but have 0 Pidgeys and 0 Candies remaining.");
56. }
57. {
58.    if ((Pidgeys==Pminimum)&&(Candies>Cminimum))
59.    printf ("You have gained 1000XP but have 0 Pidgeys and %d Candies remaining.", C);
60. }
61. {
62.    if ((Pidgeys>Pminimum)&&(Candies==Cminimum))
63.    printf ("You have gained 1000XP but have %d Pidgeys and 0 Candies remaining.", P);
64. }
65. {
66.    if ((Pidgeys>Pminimum)&&(Candies>Cminimum))
67.    printf ("You have gained 1000XP but have %d Pidgeys and %d Candies remaining.", P, C);
68. }
69. {
70.    if ((Pidgeys>Pminimum)&&(Candies>Cminimum))
71.    printf (" Please input your remaining Pidgey and Candy values to see if more XP can be gained.");
72. }
73. }