Question: In C++ please! Given three integers on input, follow the instructions in the code to arrive at the correct answer. Given three integers on input,
In C++ please!
Given three integers on input, follow the instructions in the code to arrive at the correct answer.




Given three integers on input, follow the instructions in the code to arrive at the correct answer. Sample Input: 20 60 40 Sample Output: The sum of the inputs are 120 The final answer is 100 main.cpp Load default template... 9 1 //This lab gives a student practice in programming C++ pointers 2 #include 3 using namespace std; 4 5 int main() 6 { 7 //create three integer variables and then read the values from cin, also create a variable that will store 8 //the smallest of the three int vali, val2, val3, smallest; 10 11 //this code is incomplete, finish it 12 cin >> vall; 13 14 15 //create three variables that are pointers to integers, call them ptri, ptr2, and ptr3. 16 //This is incomplete. Finish it. 17 int* ptri; 18 19 1/dynamically allocate three chunks of memory that will be used to store integer values. 20 //One statement is provided, you finish it 21 ptr1 = new int; main.cpp Load default template... //Write code to store the input values (vali, val2, and val3) into the memory addresses that // (ptri, ptr2, and ptr3) are pointing to. Finish this section, it is incomplete. *ptr1 = vali; 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 //The following statement will sum the three input values by derefrencing the three pointer variables. //Check the output here to make sure it is accurate. This is a check point for you. int answer = *ptrl + *ptr2 + *ptr3; cout