Advertisement
Guest User

qwret

a guest
Jan 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6.  
  7. void Input(char *a[], const int x)
  8. {
  9.  
  10.     cout << "Enter array:\n";
  11.     for (int i = 0; i < x; i++)
  12.     {
  13.         int num=i+1;
  14.         cout << "number\t" << num << endl;
  15.         cin >> a[i];
  16.     }
  17.  
  18. }
  19. void Output(char *a[],char *b[], const int x)
  20. {
  21.  
  22.    
  23.     cout << "route is:\n";
  24.    
  25.     for (int i = 0; i < x; i++)
  26.     {
  27.         int num = i + 1;
  28.         cout << "\t route " << num << ": \n";
  29.         cout << a[i]<<" - ";
  30.         cout << b[i] << endl;
  31.     }
  32.     //cout << endl;
  33. }
  34.  
  35. struct March {
  36.     char *begin[8];
  37.     char *end[8];
  38.     int number;
  39. };
  40.  
  41.  
  42. int main()
  43. {
  44.     March A;
  45.     Input(A.begin, 8);
  46.     Input(A.end, 8);
  47.     Output(A.begin,A.end,8);
  48.  
  49.     system("pause");
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement