码迷,mamicode.com
首页 >  
搜索关键字:readline    ( 2056个结果
C#_数组
//输入n个学生分数,排名 Console.WriteLine("请输入学生的人数:"); int n = Convert.ToInt32(Console.ReadLine()); int[] fs = new int[n]; ...
分类:编程语言   时间:2015-07-09 00:25:26    阅读次数:141
for语句之打印三角形问题
1.左下角直角三角形Console.Write("请输入要打印几行:"); int a = Convert.ToInt32(Console.ReadLine()); for (int i = 1; i = 0; j--) { ...
分类:其他好文   时间:2015-07-09 00:08:01    阅读次数:166
C#语言基础
一、主函数:namespace ConsoleApplication 这是命名空间class Program 类static void Main(string[] args) 方法主函数的内容:输入语句:Console.ReadLine();//一次读入一行 Console.ReadKey();//...
分类:编程语言   时间:2015-07-08 00:32:43    阅读次数:131
switch语句:适用于一个条件有多个分支的情况---分支语句
例1:客服选择功能,然后按按键Console.WriteLine("查花费请按1,查余额请按2,查流量请按3,办理业务请按4,宽带请按5,人工服务请按6,集团业务请按7"); int a = Convert.ToInt32(Console.ReadLine());//选择一个功...
分类:其他好文   时间:2015-07-08 00:31:51    阅读次数:157
if语句求三个数中最大的
Console.WriteLine("请输入第一个数:"); int a = Convert.ToInt32( Console.ReadLine()); Console.WriteLine("请输入第二个数:"); int b = C...
分类:其他好文   时间:2015-07-08 00:26:34    阅读次数:98
15-07-06 小游戏-看名字测缘分
while (true) { Console.WriteLine("请输入你的姓名:"); string name1 = Console.ReadLine(); int seed1 = 0...
分类:其他好文   时间:2015-07-08 00:20:24    阅读次数:154
设置python 命令行交互程序自动补齐
1. 新建Python环境变量配置文件: vim ~/.pystartup # Add auto-completion and a stored history file of commands to your Python # interactive interpreter. Requires Python 2.0+, readline. Autocomplete is # ...
分类:编程语言   时间:2015-07-07 23:03:47    阅读次数:482
if语句判断闰年、平年
一、让用户输入一个年份,判断是否是闰年。 判断一个年份是否是闰年有两个条件 ①能被400整除;②能被4整除但是不能被100整除 Console.WriteLine("请输入年份:"); int nian = Convert.ToInt32(Console.ReadLine(...
分类:其他好文   时间:2015-07-07 22:46:04    阅读次数:213
15-07-06 定闹钟
Console.WriteLine("请输入闹钟的日期时间"); DateTime s = Convert.ToDateTime(Console.ReadLine()); while (true) { ...
分类:其他好文   时间:2015-07-07 22:30:30    阅读次数:157
if语句判断身高体重是否标准
1.判断身高,体重是否标准Console.WriteLine("请输入您的身高:"); int sg = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("请输入您的体重:"); ...
分类:其他好文   时间:2015-07-07 18:58:55    阅读次数:123
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!