<mosaic.cnfolio.com>
PROGRAM
  1. /*
  2. start
  3. ask for number of pidgey pokemon that are going to get evolved
  4. IF the number of pidgey pokemon that are going to get evolved is less than 0
  5. THEN
  6. display this value is not accepted
  7. ELSE
  8. ask for number of candys in inventory
  9. END IF
  10. IF the number of candys in inventory less than 0
  11. THEN
  12. display this value is not accepted
  13. ELSE
  14. END IF
  15. IF the number of candys is greater than or equal to the number of pigey pokemon mulitpyed by 12
  16. THEN
  17. ask if this is the users first time evolving a pidgey pokemon
  18. ELSE
  19. display sorry you dont have enough candys to evolve all your pokemon
  20. END IF
  21. IF the number of first time evolving a pidgey pokemon less than 0
  22. THEN
  23. display this value is not accepted
  24. ELSE
  25. END IF
  26. IF yes it is the first time evolving a pokemon
  27. THEN
  28. mulitply and  display number of pidgey pokemon that are going to get evolved by 1000+500 and number of candys-12
  29. ELSE
  30. mulitply and display number of pidgey pokemon that are going to get evolved by 1000 and number of candys-12
  31. ASK if the user wants to evlove other pokemon
  32. END IF
  33. IF the users says yes
  34. THEN
  35. ask the user to pick ethier a zubat or a rattata
  36. END IF
  37. IF the user says he wants a zubat
  38. THEN
  39. ask for number of zubat pokemon that are going to get evolved
  40. END IF
  41. IF the number of zubat pokemon that are going to get evolved is less than 0
  42. THEN
  43. display this value is not accepted
  44. ELSE
  45. ask for number of candys in inventory
  46. END IF
  47. IF the number of candys in inventory less than 0
  48. THEN
  49. display this value is not accepted
  50. ELSE
  51. END IF
  52. IF the number of candys is greater than or equal to the number of zubat pokemon mulitpyed by 50
  53. THEN
  54. ask if this is the users first time evolving a zubat pokemon
  55. ELSE
  56. display sorry you dont have enough candys to evolve all your pokemon
  57. END IF
  58. IF the number of first time evolving a zubat pokemon less than 0
  59. THEN
  60. display this value is not accepted
  61. ELSE
  62. END IF
  63. IF yes it is the first time evolving a pokemon
  64. THEN
  65. mulitply and  display number of zubat pokemon that are going to get evolved by 1000+500 and number of candys-50
  66. ELSE
  67. mulitply and display number of zubat pokemon that are going to get evolved by 1000 and number of candys-50
  68. END IF
  69. IF user wants rattata
  70. THEN
  71. ask for number of rattata pokemon that are going to get evolved
  72. IF the number of rattata pokemon that are going to get evolved is less than 0
  73. THEN
  74. display this value is not accepted
  75. ELSE
  76. ask for number of candys in inventory
  77. END IF
  78. IF the number of candys in inventory less than 0
  79. THEN
  80. display this value is not accepted
  81. ELSE
  82. END IF
  83. IF the number of candys is greater than or equal to the number of rattata pokemon mulitpyed by 25
  84. THEN
  85. ask if this is the users first time evolving a rattata pokemon
  86. ELSE
  87. display sorry you dont have enough candys to evolve all your pokemon
  88. END IF
  89. IF the number of first time evolving a rattata pokemon less than 0
  90. THEN
  91. display this value is not accepted
  92. ELSE
  93. END IF
  94. IF yes it is the first time evolving a pokemon
  95. THEN
  96. mulitply and  display number of rattata pokemon that are going to get evolved by 1000+500 and number of candys-25
  97. ELSE
  98. mulitply and display number of rattata pokemon that are going to get evolved by 1000 and number of candys-25
  99. END IF
  100. END
  101.    
  102.  
  103.  
  104.  
  105.  
  106. */
  107.  
  108. #include <stdio.h>
  109. int main( void )
  110. {
  111. /*here I declared all my variables to make the program stop no run though the whole thing*/
  112. int numberofpidgeys = 0;
  113. int numberofzubat = 0;
  114. int numberofrattata = 0;
  115. int pidgeycandys = 0;
  116. int zubatcandys = 0;
  117. int rattatacandys = 0;
  118. int firsttimepidgey = 0;
  119. int firsttimezubat = 0;
  120. int firsttimerattata = 0;
  121. int pokename = 0;
  122. int pokename2 = 0;
  123. int check = 0;
  124. int otherpokemon = 0;
  125. int othername = 0;
  126. check=0;
  127.  printf("\nhello how many pidgey pokemon do you wanna evolove ?");
  128.  scanf("%d",&numberofpidgeys);
  129.  /*I made this if statment to check for errors after every scan*/
  130. if(numberofpidgeys<=0)
  131. { printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  132. check=1;}
  133.    
  134.     if(check==0)
  135. {printf("\nhow many pigdey candys do you have in your inventory  ? ");
  136. scanf("%d",&pidgeycandys);
  137.  
  138. if(pidgeycandys<=0)
  139. { printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  140. check=1;} }
  141.       if(check==0)
  142.     {
  143. if(pidgeycandys >=12*numberofpidgeys)
  144. { printf("\nis this the first time you evlove a pigdey type one for yes and two for no?");
  145.    scanf("%d",&firsttimepidgey);
  146.    
  147.  
  148.  if(firsttimepidgey<=0) {printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  149. check=1;}
  150.        
  151.     if(check==0){
  152.      if(firsttimepidgey==1)
  153.   {
  154.         printf("\nExp %d",numberofpidgeys * 1000+500);
  155.         printf("\npidgey candys remaining %d",pidgeycandys-12);
  156.    printf("\ntype 1 if you would like to evlove other pokemon ?");
  157.    scanf("%d",&otherpokemon);
  158.    }
  159.    else
  160.    { printf("\nExp %d",numberofpidgeys * 1000);
  161.     printf("\npidgey candys remaining %d",pidgeycandys-12);
  162.     printf("\ntype 1 if you would like to evlove other pokemon ?");
  163.       scanf("%d",&otherpokemon);
  164.    if(othername<=0) {printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  165.       check=1;}     
  166.    }
  167.    }
  168.    } else
  169.    {printf("\nsorry you dont have enough candys");};
  170.       }
  171.             if(otherpokemon==1)
  172.       {printf("\npick a pokemon to evlove \n1.  zubat\n2. rattata\n");
  173.          scanf("%d",&pokename2);}
  174.       if(pokename2<=0) {printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  175.       check=1;}
  176.       if(pokename2==2){ printf("\n how many rattata pokemon do you wanna evolove ?");
  177.                  scanf("%d",&numberofrattata);
  178.       if(numberofrattata<=0)
  179.       { printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  180.       check==1;}
  181.    
  182.     if(check==0)
  183. {printf("\nhow many rattata candys do you have in your inventory  ? ");
  184. scanf("%d",&rattatacandys);
  185.  
  186. if(rattatacandys<=0)
  187. { printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  188. check=1;} }
  189.        if(check==0)
  190.     {
  191. if(rattatacandys >=25*numberofrattata)
  192. { printf("\nis this the first time you evlove a rattata type one for yes and two for no?");
  193.    scanf("%d",&firsttimerattata);
  194.  
  195.  if(firsttimerattata<=0) {printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  196. check=1;}   
  197.     if(check==0){
  198.      if(firsttimerattata==1)  {
  199.         printf("\nExp %d",numberofrattata * 1000+500);
  200.         printf("\nrattata candys remaining %d",rattatacandys-25)
  201.    }
  202.    else
  203.    { printf("\nExp %d",numberofrattata * 1000);
  204.     printf("\nrattata candys remaining %d",rattatacandys-25);
  205.    
  206.    if(othername<=0) {printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  207.       check=1;}         }
  208.    }
  209.    } else
  210.    {printf("\nsorry you dont have enough candys");};
  211.       }    }
  212.      
  213.      
  214.       if(pokename2==1){ printf("\n how many zubat pokemon do you wanna evolove ?");
  215.                  scanf("%d",&numberofzubat);}
  216.       if(numberofzubat<=0)
  217.       { printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  218.       check==1;}
  219.    
  220.     if(check==0)
  221.    {printf("\nhow many zubat candys do you have in your inventory  ? ");
  222.    scanf("%d",&zubatcandys);
  223.  
  224. if(zubatcandys<=0)
  225. { printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  226. check=1;} }
  227.        if(check==0)
  228.     {
  229. if(zubatcandys >=50*numberofzubat)
  230. { printf("\nis this the first time you evlove a zubat type one for yes and two for no?");
  231.    scanf("%d",&firsttimezubat);
  232.  
  233.  if(firsttimezubat<=0) {printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  234. check=1;}   
  235.     if(check==0){
  236.      if(firsttimezubat==1)  {
  237.         printf("\nExp %d",numberofzubat * 1000+500);
  238.         printf("\nzubat candys remaining %d",zubatcandys-50)
  239.    }
  240.    else
  241.    { printf("\nExp %d",numberofzubat * 1000);
  242.     printf("\nzubat candys remaining %d",zubatcandys-50);
  243.    
  244.    if(othername<=0) {printf("\nthis value is not accepted you must pick a number which is no less than 0\n" );
  245.       check=1;}         }
  246.    }
  247.    } else
  248.    {printf("\nsorry you dont have enough candys");};
  249.       }}