Computer Programming
262 subscribers
58 photos
15 videos
55 files
16 links
- Programming Lessons
- Daily problems
- Guide books

Murojaat: @asadbek_tolqinjonov
Download Telegram
// Problem
float a, b, orta;
cout<<"Enter two numbers: ";
cin>>a>>b;
orta = (a+b)/2;
cout<<"Average of these numbers: "<<orta;
// <------------Math---------->
// daraja, ildiz, modul
// pow -> power - daraja

int side, area;
cout<<"Enter the side of the square: ";
cin>>side;
area = pow(side, 2);
cout<<"Area is : "<<area;
Begin 5
//endl - endline - qatorning tugashi
int a, V, S;
cout<<"Enter the side of cube: ";
cin>>a;
V = pow(a, 3);
S = 6*pow(a,2);
cout<<"Hajm: "<<V<<endl;
cout<<"To'la sirt: "<<S;
Tushunarlimi?
// kvadrat ildiz - square root
float a, ildiz;
cin>>a;
ildiz = sqrt(a);
cout<<ildiz;
// modul - absolyut qiymat - absolute
// int a, modula;
// cin>>a;
// modula = abs(a);
// cout<<modula<<endl;
// begin 11
int a, b, yig, kop, ma, mb;
cin >> a >> b;
yig = a + b;
kop = a * b;
ma = abs(a);
mb = abs(b);
cout<<yig<<endl;
cout<<kop<<endl;
cout<<ma<<endl;
cout<<mb<<endl;
<cmath> kutubxonasi matematik operatorlardan foydalanish uchun kerak
// Integer - butun
// sm bor. nechta to'liq metr?
// 123 sm - 1 ta metr

// Butun bo'lish -> /
// Qoldiq -> %

// a va b; 23 va 7
int a, b, butun, qoldiq;
cout<<"Ikkita son kiriting: ";
cin>>a>>b;
butun = a/b;
qoldiq = a%b;
cout<<"Butun: "<<butun<<endl;
cout<<"Qoldiq: "<<qoldiq<<endl;
Butun va qoldiq bo'lishni tushundilaringmi?
👌1
Savollar?
Yaxshi bo'ldimi dars?
3🔥3👍1
Live stream finished (1 hour)
Any questions or suggestions?


Write @asadbek_tolqinjonov
2🔥1
main.cpp
2.7 KB
Bugun dars davomida yozilgan kodlar
🔥5