Session-1 Problem - 1
Due on 2020-12-04, 11:00 IST
Write a program to accept 'n' (taken from test data) numbers of elements using dynamic memory allocation and then print the element at position 'p' (taken from test data) after sorting the elements in ascending order.
For example:
If the value of n is 5 and value of p is 3 then the program will accept five numbers as input from the test data, sort them in ascending order and display the third number as output.
If the input is 20,30,90,40,80 then it will display 40 as output.
For example:
If the value of n is 5 and value of p is 3 then the program will accept five numbers as input from the test data, sort them in ascending order and display the third number as output.
If the input is 20,30,90,40,80 then it will display 40 as output.
No comments:
Post a Comment