DEV Community

Ahmadjon
Ahmadjon

Posted on

C++ 3-dars

include

using namespace std;

int main(){
// o'zgaruvchiga nom berish shart
/* int a int a,d
string b strin b,c
int d qilsa bo'ladi

string c */
// int yoki string data typeni o'zgartirmay qiymatini o'gartirish mumkin
return 0;
}
int main4(){

int yosh = 25;
int yosh1 = 26;
int yosh_ = 30;
int _yosh = 21;
int yosh5 = 45;

cout << yosh - yosh1 - yosh_ + _yosh + yosh5 << endl;

return 0;
}
int main3() {

// Veriable = o'zgaruvchi=>o'z ichida qiymat saqlaydigan konteyner
// 1-turi: string => o'zini ichida faqat matn saqlatdigan o'zgaruvcholardir;
// 2-turi: integer = int => o'z ichida faqat butun son saqlaydi;
// data tapy(ma'lut turi) name(ism) = value(qiymat)

string ismim = "Ahmadjon";
int hozirgiyil = 2024;
int ozimniyilim = 2010;

cout << "Mening ismim" << ismim << endl;
cout << "Men " << hozirgiyil-ozimniyilim << " yoshdaman";

return 0;
}
int main2() {

cout << "Birthdate\n";
cout << "Enter Month:" << 3 << endl;
cout << "Enter Date:" << 5 << endl;
cout << "Birthdate is 0" << 3 << "-0" << 5 << "(mm-dd)";
return 0;
}
int main1() {

cout << "Bu tekst/n";
cout << 12345 << endl;
cout << "345"<< endl;
cout << 10+104 << endl;
cout << 23/10 << endl;
cout << 23-10 << endl;
cout << "23/10" << endl;
cout << "23-10" << endl;

return 0;
}

Top comments (0)