Skip to main content

Posts

Showing posts from February, 2024

Program in c++1

  #include <iostream> using namespace std; const int MAX_SIZE = 100; class List { private:     int arr[MAX_SIZE];     int size; public:     List() {         size = 0;     }     void insert(int element) {         if (size < MAX_SIZE) {             arr[size++] = element;             cout << "Element inserted" << endl;         } else {             cout << "List is full" << endl;         }     }     void display() {         if (size == 0) { ...