<mosaic.cnfolio.com>
PROGRAM
1. /*Program <PokemonCalculator>:
2.     Ask user for number of Candies the user has;
3.     Scan the input;
4.     IF (input is less than 12)
5.         THEN display error;
6.         ELSE Display inputed number;
7.     Ask user for number of Pidgets the user has ;
8.     Scan the input;
9.     IF (input is less than 1)
10.         THEN display error;
11.         ELSE Display inputed number;
12.     Store the inputs;
13.     Print posible evoultions;
14.     While (candies is more than 0 and pidgets is more than 0)
15.         THEN -=12;
16.              -=1
17.              exp +=1000;
18.              posible evoultions ++;
19.
20.     Print final exp;
21.
22. END*/
23.
24. #include <stdio.h>
25.
26. int main()
27. {
28. int Candies, Pidgey, PossibleEvolutions, Pideottos, Exp = 0;
29.
30. printf("Enter number of Candies: "); // User inputs the amount of candies they have
31. scanf( "%d", &Candies ); // scans the input
32. if  ( Candies < 12 )
33.     {
34.        printf("Entered Number is %d \n", Candies); //display the input
35.        printf( "You do not have enough Candies. \n" );
36.     }
37.             else
38.     {
39.                 printf("Entered Number is %d \n", Candies);
40.                 printf( "You have enough Candies. \n" );
41.
42.     }
43.
44.
45. printf("Enter number of Pidgey: ");// User inputs the amount of Pidgeys they have
46. scanf( "%d", &Pidgey );// scans the input of # of pidgeys
47. if ( (Pidgey < 1 )) // sets criteria
48.     {
49.         printf("Entered Number is %d \n", Pidgey); //display input
50.         printf( "You do not have enough Pidgey. \n" );
51.     }
52.
53.             else
54.     {
55.         printf("Entered Number is %d \n", Pidgey);
56.         printf( "You have enough Pidgeys. \n" );
57.     }
58.
59. if (Candies>=12*Pidgey); // if the candies meets the criteria it will multiply by amount of pidgeys.
60. {
61.     printf("\nExp %d", Pidgey * 1000);
62. }
63.
64.
65.
66.
67. while ( Candies > 0 && Pidgey > 0 ) {
68. Candies -= 12;
69. Pidgey -=1;
70. Exp += 1000;
71. PossibleEvolutions++;
72. }
73.
74.
75. return 0;
76. }