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: string ime; string prezime; int godini; int n; int niza_od_poeni[100]; public: Student() { } Student(string _ime, string _prezime, int _godini, int _n, int _niza_od_poeni[]){ ime = _ime; prezime = _prezime; godini = _godini; n = _n; for(int i = 0; i < n; i++){ niza_od_poeni[i] = _niza_od_poeni[i]; } } void set_ime(string _ime){ ime = _ime; } void set_prezime(string _prezime){ prezime = _prezime; } void set_godini(int _godini){ godini = _godini; } void set_n(int _n){ n = _n; } void set_niza_od_poeni(int _niza_od_poeni[]){ for(int i = 0; i < n; i++){ niza_od_poeni[i] = _niza_od_poeni[i]; } } string get_ime(){ return ime; } string get_prezime(){ return prezime; } int get_godini(){ return godini; } int get_n(){ return n; } double procentualno(){ double sum = 0; for(int i = 0; i < n; i++){ sum += niza_od_poeni[i]; } sum /= 500; return sum * 100; } }; int main() { int niza[] = {40, 60, 100, 250, 5}; Student s("Milosh", "Kitanovikj", 14, 5, niza); cout << s.procentualno() << endl; 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)