Q:

Write a program to determine whether two vector<int>s are equal

0

Write a program to determine whether two vector<int>s are equal.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <vector>
#include <iostream>

int main() {
  std::vector<int> v1 = {1, 3, 5, 7, 9, 12};
  std::vector<int> v2 = {1, 3, 9};

  std::cout << (v1 < v2 ? "v1 < v2" : "v2 < v1") << std::endl;

  return 0;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now