22 Replies
Start by formatting your code please $code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
If your code is too long, post it to: https://paste.mod.gg/alr
@mikernet i have done it
the code is meant to input a string eg RGBB
r and b add to the only one not there so g
b and b stay as b
what in the world does that mean
okay it's meant to be like a triangle so
RGGBB
BGRB
RBG
GR
B
@Ero
what
okay so
am i stupid or something?
there's R G and B
be more clear please. how do you mean "there is"
does the user input that?
the same thing adds up next to each other
no
hold on
and what do you mean "adds up"
R and G don't add up to anything, they're letters
@Ero
i assume something is wrong with my for loop
that's an interesting task
yeahhh
it works for
an input length of 2
but then falls apart
That only runs if
i == 0
right
That's basically an if statement, not a for
You need
i >= 0
how would i change that
That middle condition is "keep iterating while this is true"
"break out when its false"
ohhh thank you