New line
Umid2008
Posted on March 10, 2023
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;
}
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
Posted on March 10, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.