Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- enum Enumeracija{ PRVI, DRUGI = 3, TRECI, CETVRTI = 8, PETI };
- void Funkcija1(int *& x, int *& y, char z){
- cout << *x++ << z << --y << " ";
- }
- int Funkcija2(double a, int b = 3){
- return a*b - 1;
- }
- int Funkcija2(double a, double b, int c = 2){
- return a + b*c;
- }
- int &Funkcija3(int f(double, int), int &a, int&b, int&c){
- cout << endl << a << b << c << endl;
- a = b + c;
- c = a + b;
- cout << endl << a << b << c << endl;
- return a;
- }
- void main(){
- int niz[] = { 3, 5, 2, 8, 7, 1, 3, 9, 0, 7 };
- int *pok1 = &niz[3];
- int *pok2 = pok1 - 1;
- int *pok3 = niz + 7;
- Enumeracija E = DRUGI;
- cout << E + 1 << DRUGI << TRECI << CETVRTI << PETI << endl;
- cout << Funkcija2(4, 6) << " " << Funkcija2(4, 6) << " " << Funkcija2(4, 6) << " " << Funkcija2(6, 4.4, 6) << endl;
- while (pok3 >= pok2){
- Funkcija1(pok2, pok3, ' ');
- ++Funkcija3(Funkcija2, niz[6], *niz, pok2[0]);
- cout << niz[6] << " " << *niz << " " << pok2[0] << endl;
- }
- system("pause>0");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement