【文章內(nèi)容簡(jiǎn)介】
? Write a program to implement the following questions: ?Define a function void input(int s[], int n) to get ten integers into an array。 ?Define a function void sort(int s[], int n) to sort these integers in the array。 ?Define a function void print(int s[], int n) to output the sorted numbers in the array。 ?Finally, write appropriate main function to test your program. 21 Assignment 6 ? Use the arrays of structures to store five students’ information including id, name and score, input the information from the keyboard, output the information of the student with the maximum score, then sort these students by scores from low to high, finally, output information of these students. 22 23 Assignment 6 ? Write a function void decrement(int* a) to decrease the value of the argument in the main function by 1. You should use pointer as parameter to the function decrement 24 Assignment 7 ? Write a function void decrement(int* a) to decrease the value of the argument in the main function by 1. You should use pointer as parameter to the function decrement. ? Similarly, write a function swap to exchange the values of two variables outside the function 25 Assignment 7 ? Input n from the keyboard ? Input n numbers from th