/*
This example shows how we can set bools equal to conditions.

Algorithm:
1. Declare two integer variables, x, and y.
2. Ask the user for two integers.
3. Read in two values from the user to store x and y.
4. Set a bool variable to hold whether x is less than y.
5. Set a bool variable to hold whether x is greater than y.
6. Set a bool variable to hold whether x is equal to y.
7. Print out the results of those three conditions.

*/

#include <stdio.h>

//have to include stdbool.h to use the bool datatype
#include <stdbool.h>

int main(void){
	//Declare two integer variables
	int x;
	int y;

	//ask the user for two integers
	printf("Please enter two integers separated by a space.");
	
	//read in the two integers
	fscanf(stdin,"%d %d",&x,&y);
	
	printf("%d %d\n",x,y);

	//set boolean variables for whether x is less than, greater than, and equal to y
	//bool less = x < y;
	//bool greater = x > y;
	bool equal = x = y;
	printf("%d %d\n",x,y);
	bool less = x< y;
	printf("%d %d\n",x,y);
	bool greater = x < y;

	//print out the comparison results
	//1 means true and 0 means false
	printf("Is %d less than %d? %d\n",x,y,less);
	printf("Is %d greater than %d? %d\n",x,y,greater);
	printf("Is %d equal to %d? %d\n",x,y,equal);

	return 0;
}

