Sortingofnos
Submit solution
Java
Points:
10 (partial)
Time limit:
1.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Write a program to print the numbers in ascending and descending order:
Test case input:
Enter the count of numbers :10
Enter number 1: 2
Enter number 2: 10
Enter number 3: 8
Enter number 4: 6
Enter number 5: 1
Enter number 6: 3
Enter number 7: 5
Enter number 8: 4
Enter number 9: 7
Enter number 10: 9
Output:
Numbers in ascending order: 1,2,3,4,5,6,7,8,9,10
Numbers in descending order: 10,9,8,7,6,5,4,3,2,1
Comments