С++ Yangi qator

maxsharr

maxsharr

Posted on March 24, 2023

С++ Yangi qator

Assalomu alaykum xurmatli dasturchi bugungi organadigon narsamiz c++ dasturlash tilida yangi qator tashlashni korib chiqamiz
Yangi qator kiritish uchun "\n" belgisidan foydalanishingiz mumkin

misol uchun::

#include <iostream>
usin namespace std;

int main()
{ 

cout <<"men c++ organishni bowladim\n"; 
cout <<"judayam qiziqarli va organishga oson";

return 0
}
Enter fullscreen mode Exit fullscreen mode

Maslahat bir-biridan keyin ikkita \n belgi bosh qator hosil qiladi

Musol uchun::

#include <iostream>
using namespace std;

int main()
{

cout << "Sizga maslahatim darsturlashni c yoki c++ dan boshlang \n\n";
cout << "Qani kettik";

return 0
}
Enter fullscreen mode Exit fullscreen mode

Satirlarni kesish uchun "\n va "endl" ham ishlatiladi. Biroq, "\n" eng kop ishlatiladi

Lekin \n aynan nima?
Yangi qator belgisi (\n) qoshish ketma ketligi dep ataladi va u kursorni oz ornini ekrandagi kengi qatorning boshiga ozgarishiga majbur qiladi. Buning natijasida yangi qator hosi boladi.

boshqa haqiqiy qoshish ketmaketliklariga misollar :

💖 💪 🙅 🚩
maxsharr
maxsharr

Posted on March 24, 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