+ 1
Can any body tell me why i can't get the output by putting special character in printf instead of emojis
7 ответов
+ 5
Emoji takes 2 characters space.
But # or & takes single character width so add space before or after single character. Then check output..
+ 3
Harshita Tyagi it is working. I replaced emoji with special characters as you say and it worked. Explain your problem in it 🤔
+ 2
The code you attached, runs correctly.
Please explain further what you are trying to do. What is not working? Which special character were you trying?
+ 2
The code playground on mobile is using a monospace font. This means that most of the basic characters, letters, whitespace, special chars have the same width in pixels. Similar to how it appears in the code editor, the letters are aligned nicely exactly below one another. Same as how a mechanical typewriter would type them. You cannot shift a line by half a character. The emoji is irregular because it is wider than a normal letter, that's why it gives the diamond like effect.
+ 1
Like if put & or # in the place of emoji then the output is not coming
+ 1
Hasnain [ACTIVE CHALLENGER]
I am getting output like this
#
##
###
####
###
##
#
I want it like this
#
##
###
####
###
##
#
+ 1
Thanks for the suggestions