zoukankan      html  css  js  c++  java
  • c#字母加密

    /*
     * 由SharpDevelop创建。
     * 用户: Administrator
     * 日期: 2018/10/14
     * 时间: 21:07
     * 
     * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
     */
    using System;
    
    namespace clianxi3
    {
    	class Program
    	{
    		public static void Main(string[] args)
    		{ 
    			string str=Console .ReadLine ();
    			string temr1="";
    			for (int i = 0; i <str .Length; i++){//便利每一个字符
    				if (str [i]>='a'&&str[i]<='z') {
    					int num=str[i];
    					num+=3;
    					char temp=(char)num;
    					temp=(char)(temp-'z'+'a'-1);
    					temr1+=temp;
    			}else if (str [i]>='A'&&str[i]<='Z') {
    				int num=str[i];
    					num+=3;
    					char temp=(char)num;
    					if (temp>'Z') {
    						temp=(char)(temp-'Z'+'A'-1);
    					}
    					temr1+=temp;
    				}else{
    					temr1+=str[i];
    				}
    				
    			}
    			Console.WriteLine(temr1);
    			
    			// TODO: Implement Functionality Here
    			
    			Console.Write("Press any key to continue . . . ");
    			Console.ReadKey(true);
    		}
    	}
    }
    
  • 相关阅读:
    mysql(一)
    spring
    数据库连接池
    spring jdbctemplate
    HDU-4219-Randomization?
    离线赛总结
    HDU-4507-吉哥系列故事-恨7不成妻
    HDU-1204-糖果大战
    [BZOJ1150][CTSC2007]数据备份
    二分图学习笔记
  • 原文地址:https://www.cnblogs.com/llhhcc/p/9795081.html
Copyright © 2011-2022 走看看