assigment operator haqida malumot
thequvonc
Posted on December 23, 2022
#include <iostream>
using namespace std ;
int main() {
int a = 10;
string ism = "davron";
cout << a << endl;
cout << ism << endl;
a=20;
ism = "quvonchbek";
cout << a << endl;
cout << ism;
return 0;
}
biz bugun assigment opperator
haqida ilk malumot egalladik!
bunda birinchi navbatta int
a
da a ni yani biron bir sonni oqib olishimiz zarur!
int a = 10;
string ism = "davron";
va biron bir soz kiritishimiz kerak
biz int
a
da yozgan sonimiz va xarifimiz masalan aniq son boladigan bolsa (10) buni biz osha qismda bir martta ishlatsak boladi
keyingi qatorda biz bu int
a
dagi sonimizni boshqa bir son ishtirokida amalga oshirishimioz mumkin
int a = 10;
string ism = "davron";
cout << a << endl;
cout << ism << endl;
a=20;
ism = "quvonchbek";
cout << a << endl;
cout << ism;
bu yerdagi yozgan cod
imizni console
dagi javobi
10
davron
20
quvonchbek
boladi!
albatta oxirida doimgidek
return 0;
}
tugatish funksiyasini yozib qoyamiz!
💖 💪 🙅 🚩
thequvonc
Posted on December 23, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.