Upload
minhhd
View
212
Download
0
Embed Size (px)
DESCRIPTION
bài tập C
Citation preview
ArrayReflection1.docx
I. Write program1. Declare an double array with max 100 elements2. Input an positive integer n that indicated the number of element of array3. Input n elements of array4. Display array has just been inputted5. Calculate sum of all elements, sum of elements that has odd index, average elements at index is a prime, average of element at odd indexII. Vit cc hm thc hin cc yu cu sau1. Nhp vo kch thc v cc phn t ca mt mng mt chiuvoid nhap(int *n, int mang[])2. Copy mt mng sang mt mng khcvoid copy(int nguon[], int dich[], int n)3. tm kim k trong mng, khng c tr v -1, c tr v chi so u tinint tim(int mang[], int n, int k)4. In danh sch v tr ca cc phn t c gi tr bng phn t nh nhtvoid nhonhat(int mang[], int n)5. Nhn i gi tr ca cc phn t v tr lvoid nhandoi(int mang[], int n)6. Nhn i gi tr ca cc phn t lvoid nhandoi1(int mang[], int n)7. To ra mng khc c cc phn t theo th t ngc livoid mangnguoc(int nguon[], int dich[], int n)8. To ra mng khc c cc phn t sx theo th t tng dnvoid sxep(int nguon[], int dich[], int n)9. chn k vo sau phn t th 3, nu s ft