C
C#•2mo ago
Jexs

How would you read this outloud or put it into a sentence?

for (int i = 0; i < 10; i += 2) {

Console.WriteLine("Even Numbers" + i);

}
for (int i = 0; i < 10; i += 2) {

Console.WriteLine("Even Numbers" + i);

}
10 Replies
Pobiega
Pobiega•2mo ago
For i where i starts at 0, increases by two and continues while i is below 10, print the text "even numbers" and the number i
Jexs
Jexs•2mo ago
Okay ty 🙂
ParaLogia
ParaLogia•2mo ago
Not sure if you're accepting different answers, but I just read what I see: For int i equals 0, i less than 10, i plus equals 2. Console write line even numbers plus i. It's harder to parse that back into code ofc
Jexs
Jexs•2mo ago
is chatgpt wrong?
No description
Pobiega
Pobiega•2mo ago
dont use chat GPT to "run code" because it doesnt actually run the code but as you can see, its incrementing by 1, not 2 it even explicitly says so in its description
Jexs
Jexs•2mo ago
okay 🙂
Jexs
Jexs•2mo ago
would this be correct?
No description
Pobiega
Pobiega•2mo ago
Too vague It's not incorrect, but it's too generic
leowest
leowest•2mo ago
$ocomp
MODiX
MODiX•2mo ago
You can compile c# online in the following websites: - sharplab - dotnetfiddle
Want results from more Discord servers?
Add your server