• 猴子


    /*
     * Created by SharpDevelop.
     * User: Administrator
     * Date: 2018/10/17
     * Time: 21:59
     * 
     * To change this template use Tools | Options | Coding | Edit Standard Headers.
     */
    using System;
    
    namespace c猴子
    {
    	class Program
    	{
    		public static void Main(string[] args)
    		{
    			//int n=Convert.ToInt32(Console.ReadLine ());
    			//int count=1;
    			//for (int i = n-1; i >=1; i--) {
    				count=(count+1)*2;
    			//}
    				
    			//Console.WriteLine(count);
    			string str=Console.ReadLine();
    			string[]strArray=str.Split(' ');
    			int []numArray=new int[strArray.Length];
    			for (int i = 0; i < strArray; i++) {
    				numArray[i]=Convert.ToInt32(strArray[i]);
    			}
    			int min=numArray[0];
    			int minIndex=0;
    			for (int i = 1; i < numArray.Length; i++) {
    				if(numArray[i]<min){
    					minIndex=i;
    					min=numArray[i];
    				}
    	
    			}
    			//把最小的数字和索引为0的位置的数字进行交换
    			int temp=numArray[0];
    			numArray[0]=numArray[minIndex];
    			numArray[minIndex]=temp;
    			for (int i = 0; i < numArray.Length; i++) {
    				Console.WriteLine(numArray[i]);
    			}
    			
    			// TODO: Implement Functionality Here
    			
    			Console.Write("Press any key to continue . . . ");
    			Console.ReadKey(true);
    		}
    	}
    }
    
  • 相关阅读:
    CentOS7的内核优化
    centos7 系统优化脚本
    Centos7之系统优化
    Jenkins安装
    Zabbix安装
    Systemd 入门教程:命令篇
    开源ERP系统Odoo搭建文档
    SSH详解
    使用pm2来保证Spring Boot应用稳定运行
    npm安装与使用
  • 原文地址:https://www.cnblogs.com/llhhcc/p/9807636.html
Copyright © 2020-2023  润新知