Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4. #include <vector>
  5.  
  6. using namespace std;
  7.  
  8. class Towers{
  9.     public:
  10.     int towerHeight;
  11.     int towerPosition;
  12. }
  13.  
  14. int main()
  15. {
  16.     string name;
  17.     vector<int> buildings;
  18.     vector<int> towers;
  19.     int N, K;
  20.     cin >> N;
  21.     cin >> K;
  22.     for(int i = 0; i < N; i++){
  23.         int buildingHeight;
  24.         cin >> buildingHeight;
  25.         buildings.push_back(buildingHeight);    
  26.     }
  27.     for(int i = 0; i < K; i++){
  28.         int towerHeight;
  29.         cin >> towerHeight;
  30.         towers.push_back(towerHeight);
  31.     }
  32.     cout << "What is your name? ";
  33.     getline (cin, name);
  34.     cout << "Hello, " << name << "!\n";
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement