Vectors
When creating vectors, you can initialize it to a list using curly braces like this:
// Initialize party to "Mario", "Luigi", and "Yoshi".
std::vector<std::string> party{"Mario", "Luigi", "Yoshi"};
// The '=' sign is optional.
// This initialize lucky_numbers to 1, 7, and 8
std::vector<int> lucky_numbers = {1, 7, 8};
Your task is to create and initialize a vector of int
called perfect_numbers
and initialize it to 6, 28, 496, and 8128 on line number 7.