CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 02:44:01 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=669576d76a6d474a6d8e77490998baeea6fe685ce47b372eea62e0e40d312388a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22nmqiM8rRTsMk8Ycb0TvlkqRj_ThkIycx%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d340c3c8f56f7a-BLR
Stip - sesta - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Pole
- {
- private:
- int *niza;
- int n;
- public:
- Pole ()
- {
- n = 0;
- niza = new int [0];
- }
- Pole (int *elementi,int n)
- {
- this->n = n;
- niza = new int [n];
- for(int i=0; i<n; i++)
- niza[i]=elementi[i];
- }
- int operator[] (int i)
- {
- return niza[i-1];
- }
- Pole& operator = (const Pole &p)
- {
- if(this != &p)
- {
- delete [] niza;
- n = p.n;
- niza = new int [n];
- for(int i=0; i<n; i++)
- niza[i]=p.niza[i];
- }
- return *this;
- }
- int dolzina ()
- {
- return n;
- }
- };
- int main ()
- {
- Pole pole;
- int n,a;
- cout<<"Vnesete dolzina na nizata"<<endl;
- cin>>n;
- int niza[n];
- cout<<"Vnesete gi elementite vo nizata"<<endl;
- for(int i=0; i<n; i++)
- cin>>niza[i];
- pole = Pole (niza,n);
- cout<<"Vnesete koja pozicija od elementot da bide prikazhana"<<endl;
- cin>>a;
- cout<<pole[a];
- cout<<endl<<"Dolzinata na nizata e "<<pole.dolzina()<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
✅ Make $2500 in 20 minutes⭐⭐⭐ S
JavaScript | 38 sec ago | 0.25 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ 7
JavaScript | 48 sec ago | 0.25 KB
-
✅⭐ Make huge profits on trading ⭐⭐ S
JavaScript | 53 sec ago | 0.25 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 1 min ago | 0.25 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ E
JavaScript | 1 min ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ T
JavaScript | 1 min ago | 0.25 KB
-
✅⭐ Make huge profits on trading ⭐⭐ B
JavaScript | 1 min ago | 0.25 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 1 min ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand