diff --git a/education/software development/ECE1400/Chapter.md b/education/software development/ECE1400/Chapter.md index 44c8ce8..d8e024d 100644 --- a/education/software development/ECE1400/Chapter.md +++ b/education/software development/ECE1400/Chapter.md @@ -39,4 +39,10 @@ printf("%d", i < j || k); (i > j) - (i < j) ``` -> 6. Is the following `if` statement lega \ No newline at end of file +> 6. Is the following `if` statement legal? + +```c +if (n >= 1 <= 10) + printf("n is between 1 and 10\n"); +``` +Yes the statement is *legal*, but it does not produce the intended effect. It would produce an output when `n` is zero because `0 >= 1` would evaluate to `0`, and `0 <= 10` is false. \ No newline at end of file