I have a task on my C# programming book that i need to program a:
"Program that reads two numbers from the keyboard and prints if the number 1 is bigger than, equal to or less than number 2.
The reason i assume i can't use if statements is because they have not yet been covered. This task is given before the book teaches the if statements. I have been trying to figure this out, do i need to use the ? operator..? It would be easy if it asked only if it's less than or greater than, less than or equal to or equal to or greater than number 2, but now there's 3 different things.
The book already teached ? operator, but not CompareTo. I wouldn't believe it left me to guess the existence of if-statement, because all the tasks in it should be able to entirely be solved with things that have already been taught. The book is about to teach the if-statement basically just on the next page of this task though.
This is the furthest i've got :P
int number1 = Convert.ToInt32(Console.ReadLine());
int number2 = Convert.ToInt32(Console.ReadLine());