assigment operator haqida;
Abror_7
Posted on December 23, 2022
Tenglik belgisi =
bu belgi replitda int
,string
float
vachar
dan keyin kelgan belgi bilan tenglik belgisidan keyin kelganbutun son ,text(matn), kasr , belgi
larni tenglashtirib beradi.
int a = 10 ;
float PI = 3.14;
float r = L/(2*PI);
float S = PI * (r*r);
string ism = "davron";
assignment operator
biz yozgan ko'dlarni qisqartirib yozib beradi.
b = b + a; //b += a;
b = b - a; //b -= a;
b = b / a; //b /= a;
b = b * a; //b *= a;
Biz yozgan o'zgaruvchilarni keyinchalik ham o'zgartirsa bo'ladi.
#include <iostream>
#include <cmath>
using namespace std;
int main (){
int a = 7;
string ism = "Abror";
cout << a << endl;
cout << ism << endl;
a = 10;
ism = "Sardor";
cout << a << endl;
cout << ism;
return 0;
}
π πͺ π
π©
Abror_7
Posted on December 23, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.