Advertisement
HyperSensualNarwhal

Untitled

Jan 10th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <iostream>
  2. #include <ctime>
  3.  
  4. using std::cin;
  5. using std::cout;
  6. using std::endl;
  7.  
  8. #define TAB '\t';
  9. #define E4 cout << "\n\n\n\n";
  10. #define E10 cout << "\n\n\n\n\n\n\n\n\n\n";
  11.  
  12. void main()
  13. {
  14.     setlocale(LC_ALL, "Ru");
  15.     srand(time(NULL));
  16.  
  17.     const int size = 10;
  18.     int Arona[size];
  19.     int Borea[size];
  20.     int Carea[size];
  21.  
  22.     int temp;
  23.  
  24.  
  25.     for (int i = 0; i < size; ++i)
  26.     {
  27.         cout << (Arona[i] = rand() % 100 - 100) << TAB;
  28.         cout << endl;
  29.         cout << (Borea[i] = rand() % 100 - 100) << TAB;
  30.     }
  31.  
  32.     E4
  33.  
  34.     for (int i = 0; i < size; ++i)
  35.     {
  36.         Carea[i] = Arona[i] + Borea[i];
  37.        
  38.     }
  39.  
  40.     for (int i = 0; i < size; ++i)
  41.         cout << Carea[i] << TAB;
  42.  
  43.     E10
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement