• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






行水流云

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

04 2013 档案

 
.NET中,写一个函数找出一个整数数组中,第二大的数(整数数组作为函数参数)
摘要:static void Main(string[] args) { int[] nums = { 1, 2, 10, 1, 5, 5, 3, 101, 11, 12, -1, 12 }; int secmax = SecNum(nums, nums.Length); #region 数组不做参数时,直接在主函数中写 //int max = nums[0]; ////int secmax = -1; //for (int i = 0; i < nums.Length; i++) //{ // //如果nums[i]大于最大数,... 阅读全文
posted @ 2013-04-19 22:39 行水流云 阅读(1394) 评论(4) 推荐(1)