Code_c.txt

  • Uploaded by: Khanh Van Huynh
  • 0
  • 0
  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Code_c.txt as PDF for free.

More details

  • Words: 106
  • Pages: 1
#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"

Code_c.txt
October 2019 8
Bai 1.docx
October 2019 7
May 2020 0