Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. enum Enumeracija{ PRVI, DRUGI = 3, TRECI, CETVRTI = 8, PETI };
  4. void Funkcija1(int *& x, int *& y, char z){
  5. cout << *x++ << z << --y << " ";
  6. }
  7. int Funkcija2(double a, int b = 3){
  8. return a*b - 1;
  9. }
  10. int Funkcija2(double a, double b, int c = 2){
  11. return a + b*c;
  12. }
  13. int &Funkcija3(int f(double, int), int &a, int&b, int&c){
  14. cout << endl << a << b << c << endl;
  15. a = b + c;
  16. c = a + b;
  17. cout << endl << a << b << c << endl;
  18. return a;
  19. }
  20.  
  21. void main(){
  22. int niz[] = { 3, 5, 2, 8, 7, 1, 3, 9, 0, 7 };
  23. int *pok1 = &niz[3];
  24. int *pok2 = pok1 - 1;
  25. int *pok3 = niz + 7;
  26. Enumeracija E = DRUGI;
  27. cout << E + 1 << DRUGI << TRECI << CETVRTI << PETI << endl;
  28. cout << Funkcija2(4, 6) << " " << Funkcija2(4, 6) << " " << Funkcija2(4, 6) << " " << Funkcija2(6, 4.4, 6) << endl;
  29. while (pok3 >= pok2){
  30. Funkcija1(pok2, pok3, ' ');
  31. ++Funkcija3(Funkcija2, niz[6], *niz, pok2[0]);
  32. cout << niz[6] << " " << *niz << " " << pok2[0] << endl;
  33. }
  34. system("pause>0");
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement