Advertisement
Guest User

Class

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