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

Murojaat: @asadbek_tolqinjonov
Download Telegram
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?
// Problem 6
// Total GPA?
// input: number of classes - fanlar soni - 5 ta ASC, FP, CP, DT, Cal
// input: credits for subject CP - 8
// input: total mark; mark - 4
// totalGPA = (credit*mark+creditofCP*mark)/totalCredit
// totalGPA = (3*4.5 + 2*3.5 + 1*4.5)/(3+2+1) = (13.5+7+4.5)/6 = 25 / 6 = 4.1666
// totalGPA = totalMark/totalCredit

// float n, credit, mark, totalMark = 0, totalCredit = 0;
// cout<<"Enter the number of subjects: "; cin>>n;
// for (int i=1; i<=n; i++) {
// cout<<"Enter credits and mark: "; cin>>credit>>mark;
// totalCredit += credit;
// totalMark += credit*mark;
// }
// float totalGPA = totalMark/totalCredit;
// cout<<"Total GPA: "<<totalGPA<<endl;
❀1
// Problem 7
// Prime or not?
// input: number
// output: yes or no

// prime: 2 ta bo'luvchisi bo'lishi shart: 1 va o'zi
int n, counter = 0;
cout<<"Enter a number: "; cin>>n;
for (int i=1; i<=n/2; i++) if (n%i==0) counter++;
if (counter==1) cout<<"Number is prime";
else cout<<"Number is not prime";
// Problem 8
// n = 12345 = 1*10000 + 2*1000 + 3*100 + 4*10 + 5
// r = 54321 = 5*10000 + 4*1000 + 3*100 + 2*10 + 1
// reverse = n%10
// reverse = reverse * 10
int n, reverse = 0;
cout<<"Enter the number: "; cin>>n;
while (n!=0) {
reverse *= 10;
reverse += n%10;
n = n/10;
}
cout<<reverse;
Savollaring?
Darsimiz yaxshi bo'ldimi?

YaxshiπŸ”₯
πŸ”₯8
Live stream finished (1 hour)
Media is too big
VIEW IN TELEGRAM
πŸ”–Extra Session - Midterm Preparation

πŸŽ₯Lesson 4
πŸ’»C++ Programming
🧩Topics:
β€” for, while loop statemets

#cpp

@cpp_siriusπŸ‘¨β€πŸ’»
πŸ”₯3
For sikl operatori.pdf
812.1 KB
For sikl operatori uchun qoΚ»llanma

#cpp
@cpp_siriusπŸ‘¨β€πŸ’»
Any suggestions and questions?

@asadbek_tolqinjonov
Live stream scheduled for
‼️Extra Sessions for Midterm Preparation‼️

Today we are going to organize an online lesson

πŸ’» C++ Programming
⏰ Time: 21:00
Topic will be Functions


βœ…Be prepared, guys

@cpp_siriusπŸ‘¨β€πŸ’»
❀6
Computer Programming
Photo
‼️We have changed the code