Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C++ Create a function that fills one vector with even random 2 digit numbers

ID: 640417 • Letter: I

Question

 In C++  Create a function that fills one vector with even random 2 digit numbers and another vector with odd random numbers.  Prompt the user for the size of these vectors.  Both will be the same size. Output the results where you ask the user how many columns to display.  These should be done with 2 functions, fillVec and prntVec. Then do the same with a 2-Dim array where the first column has even numbers and the second column has the odd numbers. 

Explanation / Answer

#include using namespace std; int main() { int input, remainder, odd = 0, even = 0; int *myEvenData, *myOddData; myEvenData = new int [even]; myOddData = new int [odd]; cout > input; while (input != 0) { remainder = input % 2; if (remainder == 0) { myEvenData[even] = input; even++; } else { myOddData[odd] = input; odd++; } cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote