10.1 LTCB
10.1 LTCB
h>
//bai 10.1
int main()
int arr[MAX];
int n,i;
do{
scanf("%d",&n);
while(n<=0);
scanf("%d",&arr[i]);
if(fo!=NULL)
for(i=0;i<n;i++)
fprintf(fo,"%d",arr[i]);
fprintf(fo,"\n");
int tong=0;
tong += arr[i];
if(fo!=NULL)
fprintf(fo,"%d",tong);
fprintf(fo,"\n");
fclose(fo);
if(fi!=NULL)
int tmp;
while(!feof(fi))
fscanf(fi,"%d",&tmp);
printf("%d\t",tmp);
printf("\n");
fclose(fi);
if(arr[i]>arr[j])
arr[i] = arr[j];
arr[j] = tmp;
}
fo = fopen("dulieu.txt","at");
if(fo!=NULL)
fprintf(fo,"%d",arr[i]);
fprintf(fo,"\n");
fclose(fo);
return 0;