uk
Feedback

Не попадись на ботовода! Telemetrio знаходить і позначає такі канали мітками 👉 Хочеш бачити мітку, оформляй підписку

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

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

Відкрити в Telegram

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

Показати більше
Buy Ad
1 517
Підписники
Немає даних24 години
+37 днів
-230 днів
Архів дописів
السلام عليكم ورحمة الله وبركاته هل في فرق بين int و void في لغة ++c
18 груд 2024, 03:02

sticker.webp0.07 KB
16 груд 2024, 14:18

السؤال
هو يفضل قبل البدأ في ASP .NET ابدأ بِــــSQL الاول وبعدها بالــــــــــ#C
الإجابة بتبدأ بلغة C# و بالمنتصف لما توصل لقواعد البيانات بتدرس SQL و بتستكمل C#، المفاهيم ما خلصت عند ال Database
16 груд 2024, 14:18

sticker.webp0.07 KB
16 груд 2024, 09:51

السؤال
عندي استفسار : السلام عليكم ورحمة الله يا اخوان انا محتار في اني اتعلم تطوير الويب وفيه مسارين قدامي : مسار بايثون مع جانقو مسار جافاسكريبت والسبب اني ابرمج في بايثون بشكل مقبول يعني ودي اروح مع جانقو لكن جانقو في front end مو ممتازة لكن في back end ممتازة جداً . و جافاسكريبت يبي لي اتعلمها و اتعلم MERN معاها و موضوعها بيطول و اصعب بكثير انا شايل هم الواجهات لأن عندي مشاريع وهمي الواجهات ، اتمنى احد يفيدني
الإجابة و عليكم السلام و رحمة الله اختار اللي تحبه أكثر، مجالات البرمجة مطلوبة نسبياً الفكرة أنك تجتهد باللي تحبه أكثر حتى تبدع فيه بإذن الرحمن
16 груд 2024, 09:51

sticker.webp0.07 KB
14 груд 2024, 14:16

#include <iostream>
using namespace std;

struct Node {
    int value;
    Node* next;

    // Constructor
    Node(int val) {
        value = val;
        next = nullptr;
    }
};

class LinkedList {
private:
    Node* head;

public:
    // Constructor
    LinkedList() {
        head = nullptr;
    }

    // 1. Insert at the front
    void insert_front(int value) {
        Node* new_node = new Node(value);
        new_node->next = head;
        head = new_node;
    }

    // 2. Insert at a specific position
    void insert_position(int position, int value) {
        if (position == 0) {
            insert_front(value);
            return;
        }

        Node* new_node = new Node(value);
        Node* current = head;

        for (int i = 0; i < position - 1; i++) {
            if (current == nullptr) {
                cout << "Position out of range!" << endl;
                return;
            }
            current = current->next;
        }

        new_node->next = current->next;
        current->next = new_node;
    }

    // 3. Insert at the end
    void insert_last(int value) {
        Node* new_node = new Node(value);
        if (head == nullptr) {
            head = new_node;
            return;
        }

        Node* current = head;
        while (current->next != nullptr) {
            current = current->next;
        }

        current->next = new_node;
    }

    // 4. Delete from the front
    void delete_front() {
        if (head == nullptr) {
            cout << "List is empty!" << endl;
            return;
        }

        Node* temp = head;
        head = head->next;
        delete temp;
    }

    // 5. Delete at a specific position
    void delete_position(int position) {
        if (head == nullptr) {
            cout << "List is empty!" << endl;
            return;
        }

        if (position == 0) {
            delete_front();
            return;
        }

        Node* current = head;
        for (int i = 0; i < position - 1; i++) {
            if (current == nullptr || current->next == nullptr) {
                cout << "Position out of range!" << endl;
                return;
            }
            current = current->next;
        }

        Node* temp = current->next;
        current->next = temp->next;
        delete temp;
    }

    // 6. Delete from the end
    void delete_last() {
        if (head == nullptr) {
            cout << "List is empty!" << endl;
            return;
        }

        if (head->next == nullptr) {
            delete head;
            head = nullptr;
            return;
        }

        Node* current = head;
        while (current->next->next != nullptr) {
            current = current->next;
        }

        delete current->next;
        current->next = nullptr;
    }

    // 7. Display the list
    void display() {
        if (head == nullptr) {
            cout << "List is empty!" << endl;
            return;
        }

        Node* current = head;
        while (current != nullptr) {
            cout << current->value << " -> ";
            current = current->next;
        }
        cout << "NULL" << endl;
    }

    // 8. Count the number of nodes
    int count() {
        int count = 0;
        Node* current = head;
        while (current != nullptr) {
            count++;
            current = current->next;
        }
        return count;
    }
};

int main() {
    LinkedList list;

    list.insert_front(10);
    list.insert_last(20);
    list.insert_last(30);
    list.insert_position(1, 15);
    list.display();

    cout << "Count: " << list.count() << endl;

    list.delete_front();
    list.display();

    list.delete_last();
    list.display();

    list.delete_position(1);
    list.display();

    cout << "Count: " << list.count() << endl;

    return 0;
}
14 груд 2024, 14:16

1. insert_front(): تضيف عنصرًا في بداية القائمة. 2. insert_position(position, value): تضيف عنصرًا في موقع معين. 3. insert_last(): تضيف عنصرًا في نهاية القائمة. 4. delete_front(): تحذف العنصر الأول. 5. delete_position(position): تحذف العنصر في موقع معين. 6. delete_last(): تحذف العنصر الأخير. 7. display(): تعرض جميع العناصر الموجودة في القائمة. 8. count(): تعيد عدد العناصر في القائمة.
14 груд 2024, 14:16

وبعدين تعمل ليهم كود
14 груд 2024, 14:16

ممكن توضحلو دول
14 груд 2024, 14:16

-linked list Functions: 1-insert front() 2-insert postion() 3-insert last() 4-delete front() 5-delete postion() 6-delete last() 7-display() 8-count()
14 груд 2024, 14:16

sticker.webp0.07 KB
13 груд 2024, 07:11

ابدأ بـ w3schools بعدها بـ w3resource بعدها بـ CoderHub بعدها بـ Codeforces بعدها بـ Satr بعدها بـ HackerRank بعدها بـ LeetCode بعدها بـ CodeWars هذا ترتيب حسب سهولة الإستيعاب والتأقلم على حل المسائل بالنسبة للجامعات ممكن تكتفي بأول 3 مواقع
13 груд 2024, 07:11

اشتي ادرب عقلي على حل المشكلات
13 груд 2024, 07:11

sticker.webp0.07 KB
12 груд 2024, 05:24

#include <iostream>
using namespace std;

int main() {
    const int MAXIMUM_STARS = 4;
    for (int currentRow = 1; currentRow <= 2 * MAXIMUM_STARS - 1; currentRow++) {
        int stars = (currentRow <= MAXIMUM_STARS) ? currentRow : 2 * MAXIMUM_STARS - currentRow;
        for (int column = 0; column < stars; column++)
            cout << "*";
        cout << std::endl;
    }
    return 0;
}
12 груд 2024, 05:24

ممكن تكودلي ده
ممكن تكودلي ده
12 груд 2024, 05:24

sticker.webp0.07 KB
12 груд 2024, 02:39

#include <iostream>
#include <string>
using namespace std;

// Example 1: str.size() / str.length()
void exampleSizeLength() {
    string str = "Hello";
    cout << "String length: " << str.size() << endl; // Or str.length()
}

// Example 2: str.push_back(char)
void examplePushBack() {
    string str = "Hello";
    str.push_back('!');
    cout << "After push_back: " << str << endl;
}

// Example 3: str.pop_back()
void examplePopBack() {
    string str = "Hello!";
    str.pop_back();
    cout << "After pop_back: " << str << endl;
}

// Example 4: str.erase(pos, len)
void exampleErase() {
    string str = "Hello, World!";
    str.erase(5, 7); // Remove 7 characters starting from index 5
    cout << "After erase: " << str << endl;
}

// Example 5: str.substr(pos, len)
void exampleSubstr() {
    string str = "Hello, World!";
    string subStr = str.substr(7, 5); // Extract 5 characters starting from index 7
    cout << "Substring: " << subStr << endl;
}

// Example 6: str.resize(newSize)
void exampleResize() {
    string str = "Hello";
    str.resize(8, '*'); // Resize to 8 characters, filling with '*'
    cout << "After resize: " << str << endl;
}

// Example 7: str.insert(pos, subStr)
void exampleInsert() {
    string str = "Hello!";
    str.insert(5, ", World");
    cout << "After insert: " << str << endl;
}

// Example 8: str.back()
void exampleBack() {
    string str = "Hello!";
    cout << "Last character: " << str.back() << endl;
}

// Example 9: getline(cin, str)
void exampleGetline() {
    string str;
    cout << "Enter a string: ";
    getline(cin, str);
    cout << "You entered: " << str << endl;
}

int main() {
    exampleSizeLength();
    examplePushBack();
    examplePopBack();
    exampleErase();
    exampleSubstr();
    exampleResize();
    exampleInsert();
    exampleBack();
    exampleGetline();
    return 0;
}
12 груд 2024, 02:39

امثله ممكن
12 груд 2024, 02:39