The bakery is making twice as much today. Write double_batch(grams) to multiply each ingredient's grams by 2 and return them in a new vector, in the same order.
double_batch({200, 50, 3})→[400, 100, 6]double_batch({})→[]vector<int> double_batch(const vector<int> &grams)#include <vector>
using namespace std;
vector<int> double_batch(const vector<int> &grams) {
vector<int> bigger;
for (int g : grams) {
// your code here: put g times 2 into bigger
}
return bigger;
}
Run tries the examples. When they look right, Submit.