write a programme that will read 10 integers from user and store them in an array .implement array using pointer and print array element in ascending and descending order.
1
Expert's answer
2015-11-03T03:11:28-0500
Solution #include <iostream> #include <math.h> #define N 10
using namespace std; int main(int argc, char **argv) { int *arr=new int[N]; int i; for(i=0;i<N;i++) { cout<<"Input element #"<<i<<": "; cin>>arr[i]; }
Comments
Leave a comment