码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
学习java随笔第五篇:流程控制
条件语句if(表达式){方法体}else if(表达体)else{方法体}简写形式:if...一般形式:if...else...完整形式:if...else if...else分支语句 switch(表达式){ case 表达式1: { 方法体 break; } case ...
分类:编程语言   时间:2014-06-04 18:08:52    阅读次数:353
Iterative Algorithm
An iterative algorithm takes one step at a time, ensuring that each step makes progress while maitining the loop invariant.A paradigm shift:View an al...
分类:其他好文   时间:2014-06-02 19:20:20    阅读次数:286
break MISSING_BLOCK_LABEL_160; 看源代码出现的,源代码是反编译的
break MISSING_BLOCK_LABEL_160; FileNotFoundException fnfe; fnfe; out.close(); throw fnfe; in.close(); break MISSING_BLOCK_LABEL_268; fnfe; fn...
分类:其他好文   时间:2014-06-02 11:57:28    阅读次数:194
【剑指offer】无聊的1+2+...+n
题目描述: 求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。 输入: 输入可能包含多个测试样例。 对于每个测试案例,输入为一个整数n(1<= n<=100000)。 输出: 对应每个测试案例, 输出1+2+3+…+n的值。 样例输入:...
分类:其他好文   时间:2014-06-02 10:36:56    阅读次数:204
1+2+3+...+n不能用while、for、if else等实现
问题描述 求 1+2+ … +n ,要求不能使用乘除法、 for 、 while 、 if 、 else 、 switch 、 case 等关键字以及条件判断语句。 实际意义不大,题目涉及的知识还是不错的! 方法1 用构造函数求解。 #include using namespace std; class Plus { public: Plu...
分类:其他好文   时间:2014-06-02 10:29:11    阅读次数:208
cocos2d 人物移动
#include"HelloWorldScene.h" #include"MyLayer.h" usingnamespacecocos2d; CCScene*HelloWorld::scene() { CCScene*scene=NULL; do { //‘scene‘isanautoreleaseobject scene=CCScene::create(); CC_BREAK_IF(!scene); //‘layer‘isanautoreleaseobject HelloWorld*layer=HelloW..
分类:移动开发   时间:2014-06-02 07:53:45    阅读次数:339
poj2864
1 #include 2 #include 3 #include 4 using namespace std; 5 int main () 6 { 7 int n,m; 8 while(scanf("%d %d",&m,&n)&&m&&n) 9 {10 in...
分类:其他好文   时间:2014-06-02 06:25:12    阅读次数:158
执行srvctl报错 :error while loading shared libraries: libpthread.so.0:
执行srvctl是报错 errorwhileloadingsharedlibraries:libpthread.so.0: [oracle@rac02~]$srvctl /opt/ora10g/product/10.2.0/db_1/jdk/jre/bin/java:errorwhileloadingsharedlibraries:libpthread.so.0: cannotopensharedobjectfile:Nosuchfileordirectory 查看srvctl命令..
分类:其他好文   时间:2014-06-02 04:09:00    阅读次数:285
AIX脚本创建裸设备
1.批量建立redolog裸设备脚本(非条带) #!/usr/bin/ksh i=1 while(($i<=9)); do mklv-ylv_redo"00$i"_1g-traw-wn-rn-u1oltpvg1 i=$(expr$i+1); done 2.建立stripesize为1M,stripewidth为14,lv大小为8G的裸设备, hdiskpower1=92160M #!/usr/bin/ksh i=1 while[$i-lt..
分类:其他好文   时间:2014-06-02 03:05:19    阅读次数:281
LeetCode Sort Colors
class Solution { public: void swap(int &a,int &b) { int t=a; a=b; b=t; } void ksort(int l,int h,int a[]) { if(h<l+2) return; int e=h,p=l; while(...
分类:其他好文   时间:2014-06-02 03:01:26    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!