#include <stdio.h> #include <stdlib.h> void sapthutu_giam(int arr[], int soPhanTu) { int i, j, temp; for(i=0; i< soPhanTu; i++) { for(j=i+1; j<soPhanTu; j++) { if(arr[i] < arr[j]) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } } } } int main() { const int MAXSIZE = 256; int n, i; int arr[MAXSIZE]; printf("Nhap vao so phan tu N (N>0): "); scanf("%d", &n); while(n<=0) { printf("Nhap vao so phan tu N (N>0): "); scanf("%d", &n); } for(i=0; i
More Documents from "Khanh Van Huynh"