#include using namespace std; void swap(int x, int y) { int tmp = x; x = y; y = tmp; } void swap1(int *x, int *y) { int tmp = *x; *x = *y; *y = tmp; } void swap2(int &x, int &y) { int tmp = x; x = y; y = tmp; } inline int kvadrat(const int &x) { //x++; return x * x; } inline int kub(int x = 0) { return x * x * x; } inline int manji(int x, int y) { if (x < y) return x; return y; } inline double manji(double x, double y) { if (x < y) return x; return y; } int main() { /* C-ovski komenatar */ // C++-ovski komentar cout << "Hello, world" << endl; int y(1); float a, c; cout << y << endl; cout << "Unesi a i c" << endl; cin >> a >> c; cout << "a = " << a << endl; cout << "c = " << c << endl; bool b = 0; cout << "b = " << b << endl; int *p; p = new int; *p = 4; cout << p << endl; cout << *p << endl; delete p; p = new int[10]; int i; for (i = 0; i < 10; i++) p[i] = i; for (i = 0; i < 10; i++) cout << p[i] << endl; delete [] p; int q = 1, w = 3; cout << "q = " << q << endl; cout << "w = " << w << endl; swap(q, w); cout << "q = " << q << endl; cout << "w = " << w << endl; swap1(&q, &w); cout << "q = " << q << endl; cout << "w = " << w << endl; swap2(q, w); cout << "q = " << q << endl; cout << "w = " << w << endl; cout << kub(5) << endl; cout << kub() << endl; cout << manji(2, 3) << endl; cout << manji(3, 2) << endl; cout << manji(2.2, 3.3) << endl; cout << manji(3.3, 2.2) << endl; return 0; }