Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7.     int n, m;
  8.     int a, b;
  9.  
  10.     cout << "n = ";
  11.     cin >> n;
  12.     cout << "m = ";
  13.     cin >> m;
  14.  
  15.     char cLsta[n] = {};
  16.     char cLista[m] = {};
  17.  
  18.     for (int i = 0; i < n; i++){
  19.         cin >> cLsta[i];
  20.         a = cLsta[i];
  21.         cout << "lista a" <<  a << endl;
  22.     }
  23.  
  24.  
  25.     for (int j = 0; j < m; j++){
  26.         cin >> cLista[j];
  27.         b = cLista[j];
  28.         cout <<"lista b " <<  b << endl;
  29.     }
  30.  
  31.     if (n == m){
  32.         cout << "0" << endl;
  33.     }
  34.     else if (n > m){
  35.         cout << "1" << endl;
  36.     } else {
  37.         cout << "-1" << endl;
  38.     }
  39.  
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement