Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
using namespace std; class Student { private: int *niza; int br_predmeti; public: Student() {} Student(int *a, int n) { niza = new int[n]; br_predmeti = n; for(int i = 0; i < n; i++) { niza[i] = a[i]; } } ~Student() { } void pecati() { for(int i = 0; i < br_predmeti; i++) { cout << niza[i] << " "; } cout << endl; } }; int main() { int n; cin >> n; int niza[n]; for(int i = 0; i < n; i++) { cin >> niza[i]; } Student s(niza, n); s.pecati(); int nov_n; cin >> nov_n; int nova_niza[nov_n]; for(int i = 0; i < nov_n; i++) { cin >> nova_niza[i]; } s = Student(nova_niza, nov_n); s.pecati(); return 0; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)