C
C#•4mo 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•4mo 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
JexsOP•4mo ago
Okay ty 🙂
ParaLogia
ParaLogia•4mo 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
JexsOP•4mo ago
is chatgpt wrong?
No description
Pobiega
Pobiega•4mo 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
JexsOP•4mo ago
okay 🙂
Jexs
JexsOP•4mo ago
would this be correct?
No description
Pobiega
Pobiega•4mo ago
Too vague It's not incorrect, but it's too generic
leowest
leowest•4mo ago
$ocomp
MODiX
MODiX•4mo ago
You can compile c# online in the following websites: - sharplab - dotnetfiddle
Want results from more Discord servers?
Add your server