<mosaic.cnfolio.com>
PROGRAM
1. #include <stdio.h>
2. int main(void)
3. {
4. int PidgeyE;
5. int MAXXP;
6. int Pidgey;
7. int Candy;
8.
9. scanf("%d %d", &Pidgey, &Candy);
10.  if((Candy>=0)&&(Candy<12)) {
11.     printf("Not enough pidgey candy\n");}
12.  if (Candy<0) {
13.     printf("Error:\nYou have an invalid number of candy.\n\nNumber of candy must be positive"); }
14.  if (Pidgey==0) {
15.     printf("\nYou do not have enough pidgey pokemon");}
16.  if (Pidgey<0) {
17.     printf("Error:\nYou have an invalid number of pidgey's.\nNumber of pidgey's must be positive");}
18.
19.  else if ((Candy-1/11<Pidgey)) {
20.     printf("\nYou have evolved %d Pidgey's\n", PidgeyE=(Candy-1/11));
21.     printf("Maximum XP gained is %d\n", MAXXP=PidgeyE*2*500);}
22.
23.  else if ((Candy-1/11>Pidgey)) {
24.     printf("\nYou have evolved %d Pidgey's\n", PidgeyE=Pidgey);
25.     printf("Maximum XP gained is %d\n", MAXXP=PidgeyE*2*500); }
26.
27.  else if ((Candy-1/11==Pidgey)){
28.     printf("\nYou have evolved %d Pidgey's\n", PidgeyE=Pidgey);
29.     printf("Maximim XP gained is %d\n", MAXXP=PidgeyE*2*500);}
30.
31. }