umid2008

Umid2008

Posted on March 10, 2023

New line

the programmer will learn today, what we do is look at the new string throw in the C++ programming language.
You can use the" \n " icon to insert a new line:

For example::

#include <iostream>
using namespace std;

int main ().
{

cout < < < "I started learning C++\n" < br>;
cout < < < "very interesting and easy to learn";

return 0;
}

Tip: Two \N characters after each other form an empty row:

For example::
#include <iostream>
using namespace std;

int main ().
{

cout < < < "my advice to you start programming from C or C++\N\n";
cout < < < " Qani kettik;

return 0;
}
Another way to enter a new line is to use the Special Command "endl:

For example::
#include <iostream>
using namespace std;

int main ().
{

cout < < "I am learning C++" < < endl;
cout < < < "Hello World" < Br>;

return 0;
}
Enter fullscreen mode Exit fullscreen mode

To cut lines, "\n" and "endl" are also used. However, "\n " is the most commonly used.

But what exactly is \n?
The new row symbol (\n) is called the escape sequence, and it is curso

💖 💪 🙅 🚩
umid2008
Umid2008

Posted on March 10, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

while, do-while and for loops in C++
beginners while, do-while and for loops in C++

March 7, 2024

If statements in C++
beginners If statements in C++

March 4, 2024

Operators and true folse .
beginners Operators and true folse .

March 14, 2023