ch
Feedback

不要被骗子欺骗!Telemetrio 会找到并标记这些频道 👉 如果想查看标记,请订阅

نصائح و استشارات برمجية

نصائح و استشارات برمجية

前往频道在 Telegram

• نصائح واستشارات برمجية متعلقة باسئلة تم طرحها • لطرح استفسار او سؤال: @m4md24

显示更多
Buy Ad
1 509
订阅者
无数据24 小时
+17 天
-930 天
帖子存档
يا جماعه اللاب توب دا كويس
24 9月 2023, 17:57

photo content
+1
24 9月 2023, 17:57

sticker.webp0.07 KB
24 9月 2023, 13:33

#include <iostream> #include <cmath> using namespace std; int main() { int t; cin >> t; while (t--) { int a, b; cin >> a >> b; int diff = abs(a - b); int moves = diff / 10; if (diff % 10 != 0) { moves++; } cout << moves << endl; } return 0; }
24 9月 2023, 13:32

sticker.webp0.07 KB
24 9月 2023, 11:26

/* • افضل طريقة للتحقق من اصدار التطبيق بواسطة ⬇️💙: Firebase Remote Config #تحفة_برمجية 💙 #اندرويد_Native 💙 */
24 9月 2023, 11:26

sticker.webp0.07 KB
23 9月 2023, 15:40

اه طبعا، بس دا ميمنعش انه لازم تتعب برضو عشان تغير مجالك و تتاسس بشكل نقدر نقول انه كدا انت شخص فاهم فيه
23 9月 2023, 15:40

يا رجالة هو لو مثلا دخلت مجال معين هعرف بعد كدة اعمل شيفت لمجال تاني بسهولة لو انا متاسس كويس ولا لا
23 9月 2023, 15:40

sticker.webp0.07 KB
23 9月 2023, 11:12

#include <iostream> #include <vector> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int> roundNumbers; // Store the round numbers for this test case int multiplier = 1; // To extract digits from n while (n > 0) { int digit = n % 10; if (digit != 0) { roundNumbers.push_back(digit * multiplier); } n /= 10; multiplier *= 10; } cout << roundNumbers.size() << endl; for (int i = 0; i < roundNumbers.size(); ++i) { cout << roundNumbers[i] << " "; } cout << endl; } return 0; }
23 9月 2023, 11:12

sticker.webp0.07 KB
22 9月 2023, 22:43

public static void DeleteAll() { for (int i = 0; i < employees.Length; i++) { employees[i] = null; } EmpCounter = 0; Console.WriteLine("All employees deleted successfully."); } public bool IsEmpty(int x) { return employees[x] == null; } public static void SearchByName(string name) { foreach (Employee emp in employees) { if (emp != null && emp.EmpName == name) { Console.WriteLine($"Employee ID: {emp.EmpID}"); Console.WriteLine($"Employee Name: {emp.EmpName}"); } } } }
22 9月 2023, 22:43

using System; class Employee { private static int EmpCounter = 0; private static Employee[] employees = new Employee[8]; public int EmpID { get; set; } public int EmpNumber { get; set; } public int NationalityID { get; set; } public string EmpName { get; set; } public bool Gender { get; set; } public string Email { get; set; } public int Age { get; set; } public string Specialist { get; set; } public int DeptNum { get; set; } public static void Choices() { int choice; do { Console.WriteLine("Enter your choice:"); Console.WriteLine("1: Display 2: Display All 3: Add 4: Delete 5: Delete All 6: Exit"); choice = int.Parse(Console.ReadLine()); switch (choice) { case 1: Console.WriteLine("Enter employee ID:"); int id = int.Parse(Console.ReadLine()); Display(id); break; case 2: DisplayAll(); break; case 3: Add(); break; case 4: Console.WriteLine("Enter employee ID to delete:"); int deleteId = int.Parse(Console.ReadLine()); Delete(deleteId); break; case 5: DeleteAll(); break; case 6: Environment.Exit(0); break; default: Console.WriteLine("Invalid choice. Please try again."); break; } } while (choice != 6); } public static void Display(int id) { Employee employee = ReturnData(id); if (employee != null) { Console.WriteLine($"Employee ID: {employee.EmpID}"); Console.WriteLine($"Employee Number: {employee.EmpNumber}"); Console.WriteLine($"Employee Name: {employee.EmpName}"); } else { Console.WriteLine("Employee not found."); } } public static Employee ReturnData(int id) { foreach (Employee emp in employees) { if (emp != null && emp.EmpID == id) { return emp; } } return null; } public static void DisplayAll() { Console.WriteLine("Employee List:"); foreach (Employee emp in employees) { if (emp != null) { Console.WriteLine($"Employee ID: {emp.EmpID}"); Console.WriteLine($"Employee Name: {emp.EmpName}"); } } } public static void Add() { if (EmpCounter < employees.Length) { Employee employee = new Employee(); Console.WriteLine("Enter employee ID:"); employee.EmpID = int.Parse(Console.ReadLine()); Console.WriteLine("Enter employee Number:"); employee.EmpNumber = int.Parse(Console.ReadLine()); Console.WriteLine("Enter employee Name:"); employee.EmpName = Console.ReadLine(); employees[EmpCounter++] = employee; Console.WriteLine("Employee added successfully."); } else { Console.WriteLine("Employee list is full. Cannot add more employees."); } } public static void Delete(int id) { for (int i = 0; i < employees.Length; i++) { if (employees[i] != null && employees[i].EmpID == id) { employees[i] = null; EmpCounter--; Console.WriteLine("Employee deleted successfully."); return; } } Console.WriteLine("Employee not found."); }
22 9月 2023, 22:43

لوسمحت اريد حل للبرنامج بلغة #c Create a new class for employees as shown in class diagram: Help: - Print message on the screen by calling Choices function that promote user to enter one of these choices: [ 1: Display 2: Display All 3: Add 4: Delete 5: Delete All 7- Exit]. - Calling a function depend on the choice! - Until the choice not equal 5 ask user for enter a choice by showing the previous message. - Define array for employees with size of 8. - EmpCounter must be one copy for all instances. - ReturnData( int id) used for print data of employee with id and must be called inside the body of Display(int id), DisplayAll( ). - Display( ) used to get employee id from user and then display data by calling ReturnData(int id). - IsEmpty( int x) used to check if the array at index x is empty or not and return Boolean value. - DisplayAll( ) retrieve count of employees with no empty data and then return all employees data using foreach. - SearchByName( ) search for a specific employee with his name. Employee + EmpID: int + EmpNumber: int +-NaitionalityID: int + EmpName: string + Gender: bool - Email: string + Age: int + Specialist: string + DeptNum: int - EmpCounter:int + Choices( ):void - ReturnData(int):Employee + Display( ):void + Display(int):void + Delete( ):void + Delete(int):void + Add( ):void + DisplayAll( ):void + DeleteAll( ):void - IsEmpty(int):bool + SearchByName(int):void
22 9月 2023, 22:43

sticker.webp0.07 KB
22 9月 2023, 22:23

• يا غالي خد الامور ببساطة، عادي خالص اللي بيحصلك بيحصل لناس كتير 💚 .. الدوال كل ما فيها اننا بنستخدمها عشان نكتب جواها اكواد معينة بتساعدنا نعمل مهمة .. و بعدين نستدعيها في الدالة الرئيسية اللي بتنفذ جميع الاكواد اللي جواها و بنستخدمها بالشكل اللي قولتهولك عشان ننظم الاكواد و الكود وقتها ينفع يتقري 🤝🏻💚
22 9月 2023, 22:23

طيب يا جماعه انا بأمانه محبط جدا انا بقالي اسبوعين عمال احاول افهم ال function و بحل ال homework بتاعها و في حاجات كام مسأله مش عارف احلهم ولا فاهم احلهم ازاي مش عارف ده طبيعي ولا المشكله فيا ولا فالشرح ولا المسائل هي الي كبيره على مسوايا ولا ايه لو حد يقدر يساعدني يا شباب ياريت يتفضل لأني بصراحه حالتي النفسية فالنازل خالص بسبب الموضوع ده
22 9月 2023, 22:23