Hi all,
just a quick question, do you know why the code below would the give the following answers ive given, i understand why they input on the 4 separate lines but the amount of times it prints the letter 'x' is confusing me.
Why would this give the answer: Generate 5 letters 'x' on 4 separate lines.Code:int i=1; while (i<=24) { printf("%c", i%6 ==0 ? '\n' : 'x'); i++ }
Thanks.