SHARE
TWEET

Untitled

a guest Oct 14th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Rectangle {
  5.     int a,b;
  6. };
  7.  
  8. Rectangle getData(Rectangle);
  9. int Peremeter(Rectangle);
  10.  
  11. int main()
  12. {
  13.     Rectangle rect;
  14.     rect = getData(rect);  
  15.     cout<<"S= "<<Peremeter(rect)<<endl;
  16.     system("pause");
  17.     return 0;
  18. }
  19.  
  20. Rectangle getData(Rectangle rect) {
  21.     cout << "a=: ";
  22.     cin>>rect.a;
  23.     cout << "b=: ";
  24.     cin>>rect.b;  
  25.     return rect;
  26. }
  27.  
  28. int Peremeter(Rectangle rect)
  29. {
  30.   int S=rect.a*rect.b;
  31.   return S;
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top