26 lines
429 B
C
26 lines
429 B
C
// Conditional that isn't necessary
|
|
|
|
#include <cs50.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
// Prompt user for integers
|
|
int x = get_int("What's x? ");
|
|
int y = get_int("What's y? ");
|
|
|
|
// Compare integers
|
|
if (x < y)
|
|
{
|
|
printf("x is less than y\n");
|
|
}
|
|
else if (x > y)
|
|
{
|
|
printf("x is greater than y\n");
|
|
}
|
|
else if (x == y)
|
|
{
|
|
printf("x is equal to y\n");
|
|
}
|
|
}
|