1.直接遍历数组 ,,,,,,,]; ]; ;i<arr.length;i++){ if(max<arr[i]) max=arr[i]; } 2.借用Math的方法 ,,,,,,,]; var max = Math.max.apply(Math,arr); 取最小值反之: 3.数组平均值 var arr = [5,8,2,3,7,6,9,1,4,8,3,0]; var sum=0; for(var i = 0; i < arr.length; i++){ sum += arr[i]; }
因为学的时间不长,所以借鉴了一些资料做了这个小程序,大家共同学习,共同进步.感觉很有自信,世上无难事,只怕有心人. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using
Common: FileIO.cs using System; using System.Collections.Generic; //using System.Linq; using System.Web; using System.IO; using System.Text; namespace SMS.Util { #region FileIo public class FileIO { private FileStream fsw; private StreamWriter sw; pr