76 412
Assignments Done
Successfully Done
In May 2019

Answer to Question #37365 in C++ for Mike Witter

Question #37365
Write code that dynamically allocates an array of 20 integers, then uses a loop to allow the user to enter values for each element of the array
Expert's answer
#include <iostream> 
#include <conio.h>

using namespace std;

int main ()
int* array = new int [20];
for (int i=0; i<20; i++)
cout<<"Enter the "<<i+1<<" elemet of the array: ";
cout<<"So, this is the array :"<<endl;
for (int i=0; i<20; i++)
cout<<array[i]<<" ";
delete [] array;
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions