<mosaic.cnfolio.com>

- /*START
- SET Pidgeys and Candies to INTEGER values
- SET the MINIMUM value of Pidgeys required
- SET the MINIMUM value of Candies required
- READ the input values and ASSIGN them to Pidgeys and Candies
- SET P to equal Pidgeys minus 1
- SET C to equal Candies minus 12
- if
- the number of Pidgeys and or Candies is LESS THAN their minimum values required
- DISPLAY the message, You don't have enough Pidgeys and or Candies to evolve.
- if
- the number of Pidgeys and Candies is EQUAL TO their minimum values required
- DISPLAY the message, You have gained 1000XP but have 0 Pidgeys and 0 Candies remaining.
- if
- the number of Pidgeys is MORE THAN the minimum value and the number of Candies is EQUAL TO the minimum value
- DISPLAY the message, You have gained 1000XP but have %d Pidgeys and 0 Candies remaining.
- if
- the number of Pidgeys is EQUAL TO the minimum value and the number of Candies is MORE THAN the minimum value
- DISPLAY the message, You have gained 1000XP but have %d Pidgeys and 0 Candies remaining.
- if
- the number of Pidgeys and Candies is MORE THAN the minimum values required
- DISPLAY the message, You have gained 1000XP but have %d Pidgeys and %d Candies remaining.
- if
- the number of Pidgeys and Candies is MORE THAN the minimum values required
- DISPLAY the message, Please input your remaining Pidgey and Candy values to see if more XP can be gained.
- END*/
- #include <stdio.h>
- /* Stating that the main function doesnt use any data from memory */
- int main (void)
- {
- /* Pidgeys and Candies are set as integer values */
- int Pidgeys, Candies;
- /* The minimum amount of Pidgeys is set to the value of 1 */
- int Pminimum = 1;
- /* The minimum amount of Candies is set to the value of 12 */
- int Cminimum = 12;
- scanf ("%d %d", &Pidgeys, &Candies);
- /* P is set to the value of Pidgeys minus 1 */
- int P = Pidgeys-1;
- /* C is set to the value of Candies minus 12 */
- int C = Candies-12;
- {
- if ((Pidgeys<Pminimum)||(Candies<Cminimum))
- }
- {
- if ((Pidgeys==Pminimum)&&(Candies==Cminimum))
- }
- {
- if ((Pidgeys==Pminimum)&&(Candies>Cminimum))
- }
- {
- if ((Pidgeys>Pminimum)&&(Candies==Cminimum))
- }
- {
- if ((Pidgeys>Pminimum)&&(Candies>Cminimum))
- }
- {
- if ((Pidgeys>Pminimum)&&(Candies>Cminimum))
- }
- }