C
C#•9mo ago
TommyGuns

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•9mo 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
TommyGuns
TommyGunsOP•9mo ago
Okay ty 🙂
ParaLogia
ParaLogia•9mo 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
TommyGuns
TommyGunsOP•9mo ago
is chatgpt wrong?
No description
Pobiega
Pobiega•9mo 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
TommyGuns
TommyGunsOP•9mo ago
okay 🙂
TommyGuns
TommyGunsOP•9mo ago
would this be correct?
No description
Pobiega
Pobiega•9mo ago
Too vague It's not incorrect, but it's too generic
leowest
leowest•9mo ago
$ocomp
MODiX
MODiX•9mo ago
You can compile c# online in the following websites: - sharplab - dotnetfiddle

Did you find this page helpful?