Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void Obsah(int &a, int &b,int &c);
  6.  
  7. int main()
  8. {
  9.     int a, c, b;
  10.     cout << "Zadej stranu a: " << endl;
  11.     cin >> a;
  12.     c=a;
  13.     cout << "Zadana hodnota: " << a << endl;
  14.     Obsah(a, b, c);
  15.     cout << "Obsah je: " << a << "\t Obvod je: " <<  b;
  16.     cout << "\t Zadana hodnota: " << c << endl;
  17.     return 0;
  18. }
  19.  
  20. void Obsah(int &a, int &b,int &c)
  21. {
  22.     a *= c;
  23.     b = c+c+c+c;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement