c++ da 5-dars

none2230

botirjon

Posted on August 15, 2024

c++ da 5-dars

c++dagi = shu belgi yani tenglik.Bu tenglik matematikadagi tenglikda juda katta farq qiladi.Yani matematikda

1+2=3
shunnday bo'ladi.
c++da = tenglik ning ishlatish uchun ham alohida kutib hona mavjud.
Bu kutib hone esa.

Enter fullscreen mode Exit fullscreen mode


cpp

include

c++ da esa unday emas, c++ dagi tenglik.

Enter fullscreen mode Exit fullscreen mode


cpp
a=a-3;
shunday

Yuqoridagi holat a ning qiymatini o'zgatildi.A ning qiymati  qqayerda keldi degan savol tug'ilishi mukin, a ning qiymati albatda boshida beriladi

Enter fullscreen mode Exit fullscreen mode


cpp
int a =10;
a = a-3;

Natija:

Enter fullscreen mode Exit fullscreen mode


cpp
a = 7;

Nega a ning qiymati yetiga teng bo'lib? Agarda a dan son = belgini qo'yilsa va biror bir matematik amal bajarilsa a ning qiymati o'zgaradi.
Agarda a dan song = bu belgi bo'lmasa a ning qiymati o'zgarmaydi.

Enter fullscreen mode Exit fullscreen mode


cpp

include

include

using namespace std;
int main() {
int a =10;
a = a+3;
a = a*2;
cout << a+5 << endl ;
a= a-10;
cout << a;
return 0;
}

Natiga:

Enter fullscreen mode Exit fullscreen mode


cpp
31
16



Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
none2230
botirjon

Posted on August 15, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related