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

Murojaat: @asadbek_tolqinjonov
Download Telegram
What you can learn?
— if-else statement
— switch case
— Solving extra problems
— GitHub uploading
23 va 24
Rostlikka tekshirish: true yoki false?
Computer Programming
23 va 24
// begin 24
// 2 ta yechim, 1 ta yechim, yo'q
// D>=0
// float a, b, c, d;
// cin >> a >> b >> c;
// d = pow(b,2) - 4*a*c;
// bool k = d>=0;
// cout<<boolalpha<<k;
Savollar bo'lsa yozing.
if (shart) {
true_operator;
} else {
false_operator;
}
// int uch , yuz, bir;
// cout<<"Uch xonali son kiriting: "; cin>>uch;
// yuz = uch / 100;
// bir = uch % 10;
// if (yuz==bir) {
// cout<<"Palindrom";
// } else {
// cout<<"Palindrom emas";
// }
// boolalpha 0 va 1 => true va false
Tushunarlimi?
Computer Programming
Photo
// if 1
// int n; cin>>n;
// if (n>0) {
// n++;
// } else {
// n = n;
// }
// cout<<n;
Forwarded from Sarvinoz Shomuratova
else if ni tushundilaringmi?
// Ikkita son berilgan. max?
// teng
// int a, b, max;
// cin >> a >> b;
// if (a>b) {
// max = a;
// cout<<max;
// }else if (b>a) {
// max = b;
// cout<<max;
// }else {
// cout<<"Ikkalasi teng";
// }
// Uchta son. max?
//a b c
int a, b, c, max;
cin >> a >> b >> c;
if (a>b and a>c) {
max = a;
}else if (b>a and b>c) {
max = b;
}else {
max = c;
}
cout << max << endl;
if yoki else-if
// int n; cin>>n;
// switch (n) {
// case 1: cout<<"Monday"; break; // sindirish
// case 2: cout<<"Tuesday"; break;
// case 3: cout<<"Wednesday"; break;
// case 4: cout<<"Thursday";break;
// case 5: cout<<"Friday";break;
// case 6: cout<<"Saturday";break;
// case 7: cout<<"Sunday";break;
// default: cout<<"Error";
// }
// int score; cin>>score;
// switch (score) {
// case 5: cout<<"A'lo"; break;
// case 4: cout<<"Yaxshi"; break;
// case 3: cout<<"Qoniqarli"; break;
// case 2: cout<<"Qoniqarsiz";break;
// case 1: cout<<"Juda yomon"; break;
// default: cout<<"Bunday baho yo'q"; break;
// }
Tushunarlimmi?
Dars yaxshi bo'ldimi?
3