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

Murojaat: @asadbek_tolqinjonov
Download Telegram
// 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
Computer Programming
‼️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πŸ‘¨β€πŸ’»
What will we learn today?

Functions:
β€” Function of functions
β€” Value-returning function
β€” void function
β€” Extra hard problems

‼️Join us‼️

@cpp_siriusπŸ‘¨β€πŸ’»
Live stream started
We are starting...
Ovoz?
Ekran?
Ovoz?
πŸ”₯3
// C++ dasturlash tili - funksiyalar tili

// 1. Parametrli funksiyalar;
// 2. Parametrsiz;

// 1. Value-returning (qiymat qaytaradigan)
// 2. Qiymat qaytarmaydigan (void)

// Global and local variables

// Value - qiymat parametrlari
// Ko'rsatkichlar parametrlari - Reference

// Funksiyadan chiqish