using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
char s;
do
{
s = (char)Console.Read();
s += (char)5;
Console.Write(s);
} while ('\n'==s);
}
}
}实现简单的输入一行字符串进行"加密"只往后推5个.但是为什么只有第一个被加呢
我全部是输入字母
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
char s;
do
{
s = (char)Console.Read();
s += (char)5;
Console.Write(s);
} while ('\n'==s);
}
}
}实现简单的输入一行字符串进行"加密"只往后推5个.但是为什么只有第一个被加呢
我全部是输入字母
解决方案 »
- Spread控件问题
- 关于bitmap类与image类的用法与区别?
- CLR Stored Procedure
- 求助高手!DataRow数组排序!
- 如何写sql代码格式化工具
- 我想找一个[支持MONO][不花哨][企业级或工作站或服务器版]的LINUX
- C#写了一个window服务程序,却不知如何调用外部的一个EXE窗体文件?
- 各位高手大家好,我工作中碰到一个需要将Jmail附件转换成流或字节数组的问题,希望各位能指点我一下,谢谢大家了!
- 如何实现两条分割条将窗体划成三个部分?
- 我用asp.net连接某个sqlserver数据库成功,连接另一个却出错:SQLException: SQL Server does not exist or access denied
- 同时拖拽多个文件到窗口
- 逗号的unicode编码是什么?
foreach (char c in inputString.ToCharArray())
{
char tempChar = c;
tempChar += (char)5;
Console.Write(tempChar);
}
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string s = Console.ReadLine();
for (int i=0; i<s.Length; i++)
{
s[i] += 5;
}
}
}
}