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

Murojaat: @asadbek_tolqinjonov
Download Telegram
‼️Extra Sessions for Midterm Preparation‼️

Today we are going to organize an online lesson

💻 C++ Programming
Time: 21:00

Topic:
— for, while loop statements



Be ready

@cpp_sirius👨‍💻
3
Live stream scheduled for
Live stream started
Boshlayapmiz...
Join guys, then we will start!
3
Ovozim?
Ekran?
👍1
Ovoz?
Ekran?
Cycle - sikl
Computer Programming
Photo
// Sikl - takrorlanish, aylanish
// for (<ifoda1>; <ifoda2>; <ifoda3>)
// operator;

// 1-10
// <ifoda1> - boshlang'ich qiymat;
// <ifoda2> - aylanish sharti;
// <ifoda3> - o'zgarish;
// operator - sikl tansi -> hisoblash
// Misol: 1dan 10gacha sonlarni chiqarish; 11da to'xtashi kerak
// bosh qiy = 1
// for (int i=1; i<=10; i++)
// cout<<i<<" ";
Savollar?
// b dan a gacha chiqarish - kamayuvchi sikl
// 100 sikl to'xtasin
// 1000 - 12
// int a, b; cin>>a>>b;
// for (int i=b; i>=a; i--) {
// if (i==100) {
// break; //siklni to'xtatadi
// }
// cout << i << " ";
// }


// 100 bo'sa, 100 ni chiqarmaslik kerak
// int a, b; cin>>a>>b;
// for (int i=b; i>=a; i--) {
// if (i==100) {
// continue; // keyin takrorlanishga o'tiladi - skip
// }
// cout << i << " ";
// }
Tushunyapsizlarmi?
Savollar?
// Problem 4
// int n;
// cout<<"n = "; cin>>n;
// for (int i=1; i<=n; i++) if (i%10==0) cout<<i<<" ";
// Problem 5
// Uppercase - A, B, W, U, T
// Lowercase - a, b, w, u, t
// for (int i=65; i<=90; i++) {
// if (i%5==0 and i!=65) cout<<endl;
// cout<<char(i)<<" ";
// }

// 65, 66, 67, 68, 69
// 70, 71, 72, 73, 74
// 75
Tushunarli bo'layaptimi?