Char help
What is the problem here I need to
Write a program that accepts a character as input and prints the characters in 3-character increments.

16 Replies
because of the compiler error, what you're running is not your current code
i don't quite understand the problem statement either
"prints the characters in 3-character increments" what characters?
does it give an example output?
i am putting a character from the abc and it adds 3 letter to it until it hit the last charcter probably x,y,z
could you post the last code that ran without errors?
wdym?
.
the screenshot you posted is not the code that's being run
i.e. it's not the code that's generating that output

so let's start by going back to the code that produced that output
do you see that red underline?
that code will not build and run
under ch += 3?
yes
yes i know
i dont understand what is wrong though
the error reads that you can't implicitly convert from an int to a char
because 3 is and number and not a charcter, right?
yep
so you can explicitly convert 3 to a char with a cast
(char)3
oh what
thanks
very much man
sure thing
have a good day🙏🏾