DEV Community

islomAli99
islomAli99

Posted on

2

Assignment(O'zlashtirish) (=) operatori

Image description

  • o'zgaruvchiga qiymat o'zlashtirish uchun ishlatiladi.

  • o'zlashtirish operatori (=) chap tarafida doimo o'zgaruvchi turishi shart.

200 = x;       // error - chap tarafda qiymat turibdi
x + 1 = 200    // error - chap tarafda ifoda turibdi
Enter fullscreen mode Exit fullscreen mode

To'g'ri o'zlashtirishga misollar:

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

Mashq
Quydagi ifodalar natijalarini taxmin qiling!

cout << 3 * 4 << endl;
cout << 2.0 * 3.0 << endl;
cout << 2.0 * 4 << endl;
cout << 10 / 2 << endl;
cout << 10 / 3 << endl;
cout << 10 / 3.0 << endl;
cout << 10 % 3 << endl;
cout << 3.0 + 3 / 2 << endl;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Cloudinary image

Zoom pan, gen fill, restore, overlay, upscale, crop, resize...

Chain advanced transformations through a set of image and video APIs while optimizing assets by 90%.

Explore

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay