zoukankan      html  css  js  c++  java
  • 第一单元11

    static void Main(string[] args)
    {
    string s_text, s_key, s_result = null;
    char ch;
    int i;
    Console.WriteLine("请输入原字符串:");
    s_text = Console.ReadLine();
    Console.WriteLine("请输入密钥字符串");
    s_key = Console.ReadLine();
    if (s_text.Length != s_key.Length)
    {
    Console.WriteLine("密钥字符串与原字符串长度必须相等");
    }

    else
    {
    for (i = 0; i < s_text.Length; i++)
    {
    ch = s_text[i];
    s_result = s_result + (char)(ch - (s_key[i] - 48));
    }
    Console.WriteLine("加密后字符串为:");
    Console.WriteLine(s_result);
    }

    Console.ReadLine();
    }
    }
    }

  • 相关阅读:
    mysql基础
    协程
    锁与队列
    线程练习
    线程
    并发编程
    进程
    操作系统发展史
    第六周----例行报告
    附加题找bug
  • 原文地址:https://www.cnblogs.com/xxyxc/p/7550077.html
Copyright © 2011-2022 走看看