<mosaic.cnfolio.com>

- /*
- START
- Read the value for the number of inputted pidgeys
- Read the value for the number of inputted Pidgey Candies
- Set the value of EggXP to 1000
- Set the value of Required Candies to 12
- Set TotalXP to equil the vaule of Pidgey Candies divided by Required Candies and multiplied by EggXP
- Pidgey Candies is equil Pidgey Candies plus the number of Pidgeys - 1
- INPUT value for Pidgeys & Candies
- IF the vaule is 0 THEN
- display an Error message
- END
- END IF
- IF Pidgey Candies is greater than Required Candies * Pidgeys THEN
- Calculate (Pidgey * Required Candies / Required Candies * EggXP)
- Display the Total XP
- Else
- Calculate XP (Pidgey Candies / Required Candies * Egg XP)
- Display Total XP
- END IF
- IF Pidgeys less than 0 THEN
- Calculate TotalXP and divide it by 1000
- Display the number of pidgeys evolved
- END IF
- END
- */
- #include <stdio.h>
- int main (void)
- {
- /* I have stated that all my variables are going to be used in an intager format, meaning that i will be working with whole numbers*/
- int Pidgeys;
- int Candies;
- int EvolveCandies = 12;
- int EggXP = 1000;
- int TotalXP;
- /*The Scanf function is telling the program to look for inputs and their values, i have assigned 2 variables that will be used for inputting data*/
- scanf("%d %d", &Pidgeys, &Candies);
- /*as well as inputting data for Candies there have to be left overs from each evolution and the formula bellow allows the program to take the additional candies and add them on to the total*/
- Candies = Candies + Pidgeys - 1;
- TotalXP = Candies/EvolveCandies*EggXP;
- /* this is being used as an error checker, so if a the entered values arent greater than 0 or arent a number then an error will be shown */
- switch (Pidgeys && Candies)
- {
- case 0:
- exit(0);
- }
- /* this line of code is used when the number of candies is greater than the total from multiplying EvolveCandies by Pidgeys */
- if (Candies > EvolveCandies*Pidgeys)
- {
- }
- /* this line of code is executed if the condtions above have not been met*/
- else
- {
- }
- /* this is used to tell the user of the program exactly how many pidgeys they have evolved */
- if (Pidgeys < 0);
- {
- }
- }