DEV Community

shavkatovbexzod C++
shavkatovbexzod C++

Posted on

C++ code Comments - kodlarga komentariya (izoh) yozish.

Izoh kodlaringizni ko'rayotgan odamga chunturish uchun yoziladi. C++ da izoh qoldirishni 2 ta usuli bor: bir qatorli va ko'p qatorli.

  1. Bir qatorli izoh - // bilan yoziladi. Ya'ni: #include

using namespace std;

int main()
{

cout << "Hello world" << endl;
//cout - konslga malumot chop etadi.

return 0;
Enter fullscreen mode Exit fullscreen mode

}

  1. Ko'p qatorli izoh - /**/ bilan yoziladi. Ya'ni: #include

using namespace std;

int main()
{

cout << "Hello world" << endl;
Enter fullscreen mode Exit fullscreen mode

/*
cout - konslga malumot chop etadi.
*/

return 0;
Enter fullscreen mode Exit fullscreen mode

}

Top comments (0)