0

C program code ( i need written code as i have no knowledge about c )

Write a ‘C’ program to read a list of ‘n’ integers from the keyboard and rearrange the elements in the list (i) in ascending order and (ii) in descending order and display the results. The value of ‘n’ must be read from the keyboard at run time by giving the following prompt message to the user - “ENTER THE VALUE OF n :”. Also read all the ‘n’ integers from the keyboard one after another at run time by giving the following prompt message - “NOW ENTER THE INTEGER NUMBERS:”. Can someone write this code?

14th Feb 2022, 12:50 PM
Laziza IOS
Laziza IOS - avatar
5 Respuestas
+ 5
Show your attempt first
14th Feb 2022, 1:10 PM
ÃKR
ÃKR - avatar
+ 2
ÃKR Couldnt know how to begin also☹️ it was given at linux lesson
14th Feb 2022, 1:19 PM
Laziza IOS
Laziza IOS - avatar
+ 1
A.S. Can you write it for me, please?
14th Feb 2022, 5:03 PM
Laziza IOS
Laziza IOS - avatar
+ 1
First use scanf to take input as integer Use scanf to take input inside for loop and save each value in array Use any sorting algorithm to sort it in ascending order and print it. After that start printing each value inside array in reverse order. sololearn != "Do My Homework";
14th Feb 2022, 9:56 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
0
question seem easy you need basic input output statements and for sorting you can use any algorithm like insertion sort , merge sort......
14th Feb 2022, 3:25 PM
A S Raghuvanshi
A S Raghuvanshi - avatar