how to print \ and \n in c++ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

how to print \ and \n in c++

why we have to add another \

24th Jan 2017, 11:11 AM
Shivam Raghuwanshi
2 Respostas
+ 1
try scaping the \ adding another the \. It would be \\ and \\n.
24th Jan 2017, 11:06 AM
Kleber Leal
Kleber Leal - avatar
- 1
try it:-) #include <iostream> using namespace std; int main() { cout << "\\ and \\n"; return 0; } //I think now it's true...;-)
24th Jan 2017, 11:19 AM
慤 Tweetu šŸ˜† 慤慤
慤  Tweetu šŸ˜† 慤慤 - avatar