码迷,mamicode.com
首页 >  
搜索关键字:else    ( 23991个结果
利用if else来运行咱们结婚吧
static void Main(string[] args) { while (true) { string a; Console.WriteLine("请问你有房吗:"); a = Console.ReadLine(); if (a == "有") { Console.WriteLine("请....
分类:其他好文   时间:2015-03-28 15:46:08    阅读次数:176
利用if else判断几点是什么时间段
static void Main(string[] args) { while (true) { int a; Random r = new Random(); a = r.Next(0,24); Console.WriteLine(a); if (a >= 0 && a = 6 && a = 12...
分类:其他好文   时间:2015-03-28 15:46:05    阅读次数:150
利用if else 判断方程有几个根
static void Main(string[] args) { Console.ForegroundColor = ConsoleColor.Green; Console.Clear(); while (true) { Console.WriteLine("求方程式ax²+bx=c=0的根的情况...
分类:其他好文   时间:2015-03-28 15:40:03    阅读次数:118
利用if else 来计算车费
static void Main(string[] args) { while (true) { double x,y; Console.Write("请输入坐车的距离:"); x = Convert.ToDouble(Console.ReadLine()); if (x>0&&x 3 && x ....
分类:其他好文   时间:2015-03-28 14:15:30    阅读次数:117
超过一定高度对象自动悬浮
可以根据实际需要效果更改if和else里面的属性。
分类:其他好文   时间:2015-03-28 12:50:38    阅读次数:149
利用if else判断是否及格
static void Main(string[] args) { while (true) { string a; int b; Console.Write("请输入您的姓名:"); a = Console.ReadLine(); Console.Write("请输入您的分数:"); b = C....
分类:其他好文   时间:2015-03-27 22:04:25    阅读次数:131
黑马程序员——C语言——流程控制
流程控制内容主要由选择控制和循环控制组成。一、选择控制 (一)if 选择结构 1、if(表达式) 语句1; 2、if(表达式) 语句1; else 语句2; 3、if(表达式) { } “{}”为作用域,里面可以放多个满足条件的语句 4、if-else if-else...
分类:编程语言   时间:2015-03-21 22:56:43    阅读次数:227
n皇后
n*n中选8个-->每行皇后选一列,用c[x]来存储列编号,枚举量为8!=40320void search(int cur){ if(cur == n) tot ++; else for(int i = 0; i < n; i ++) { int ok =...
分类:其他好文   时间:2015-03-21 21:14:45    阅读次数:170
Struts2标签--控制标签
参考博客:http://www.open-open.com/lib/view/open1342167592890.htmlStruts2标签库包括:OGNLStruts2标签分类控制标签 :(if, elseif,else, iterator, append, merge, generator, s...
分类:其他好文   时间:2015-03-21 01:01:45    阅读次数:255
[Python]中缀表达式转前缀表达式
#判断运算符的优先级 def opOrder(op1,op2): order_dic = {'*':4,'$':5,'/':4,'+':3,'-':3} if op1 == '(' or op2 == '(': return False elif op2 == ')': return True else: if orde...
分类:编程语言   时间:2015-03-20 22:09:43    阅读次数:261
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!