DEV Community

faxridd1n
faxridd1n

Posted on

Belgilash operatorlari

O'zgaruvchilarga qiymat berish uchun tayinlash operatorlari qo'llaniladi

Quyidagi misolda x deb nomlangan o'zgaruvchiga 10 qiymatini belgilash uchun tayinlash operatoridan (=) foydalanamiz:

Example

int x = 10;
Enter fullscreen mode Exit fullscreen mode

Qo'shishni tayinlash operatori (+=) o'zgaruvchiga qiymat qo'shadi:

int x = 10;
x += 5;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)