码迷,mamicode.com
首页 >  
搜索关键字:for while until    ( 29426个结果
关于失败
A man can fail many times, but he isn't a failure until he begins to blame somebody else.—— J. Burroughs一个人可以失败许多次,但是只要他没有开始责怪别人,他还不是一个失败者。——巴勒斯
分类:其他好文   时间:2014-07-16 23:20:38    阅读次数:203
欧几里得算法求两个整数的最大公因数
unsigned int Gcd (unsigned int m,unsigned int n){ unsigned int rem; while(n>0){ rem = m % n; m = n; n = rem; } return...
分类:其他好文   时间:2014-07-16 23:18:24    阅读次数:497
c++11 thread
我看我们项目创建线程从来不join,detach#include #include #include #include void fun(){ while (true) { std::cout << "hehhe" << std::endl; }}int main()...
分类:编程语言   时间:2014-07-10 13:57:33    阅读次数:306
Can't locate Switch.pm in @INC
the perl version (5.14) shipped with 12.10 does not include the Switch.pm module needed while building WebKiT-GTK.How to install Perl Switch.pm modu.....
分类:其他好文   时间:2014-07-10 13:26:53    阅读次数:453
ARM汇编语言实现while循环
.section .data.output: .ascii "%d\n\000".section .text .global mainmain: mov ip, sp stmfd sp!, {fp,ip,lr,pc} sub fp, ip, #4 sub sp, sp, #80 @m...
分类:编程语言   时间:2014-07-10 13:11:49    阅读次数:950
剑指offer (46) 求1+2+3+...+n
题目:求1+2+3...+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字以及条件判断语句题解分析:不能使用乘除法,也就不能使用 n(n+1)/ 2公式了不能使用for while 也就不能使用循环之类的利用构造函数求解:循环只是让相同代码重复执行n遍,我们...
分类:其他好文   时间:2014-07-10 11:33:22    阅读次数:208
PAT(B) 101-111-1-2014-03-01
1.个位数统计: #include #include #include #include #include #include #include #include #include #include #include using namespace std; char s[1005]; int n, a[10]; int main(){ while(gets(s)) { memset(a,...
分类:其他好文   时间:2014-06-28 08:55:24    阅读次数:191
Summary: Binary Search
Iterative ways: 1 int binarySearch (int[] a, int x) { 2 int low = 0; 3 int high = a.length - 1; 4 int mid; 5 6 while (low x) {12 ...
分类:其他好文   时间:2014-06-27 22:27:06    阅读次数:361
炜煌E30 E31微型热敏打印机 STM32 串口驱动
设置为汉字模式 十六进制 命令:1C    26 USART_SendData(USART2,0x1C); while(USART_GetFlagStatus(USART2,USART_FLAG_TC)==RESET); USART_SendData(USART2,0x26); while(USART_GetFlagStatus(USART2,USART_FLAG_TC)==RESET)...
分类:其他好文   时间:2014-06-27 10:19:56    阅读次数:301
条件判断式if和循环语句while及其函数的应用
条件判断式if..then、case..esacif..then是最常见的条件判断式,就是当负某个条件判断的时候,就进行某项工作,其中"&&"代表AND,"||"代表orif....then..else...fi格式:if[条件判断语句];then当条件判断成立时,可以进行的命令工作内容; fi//结束if条件判断例子:设..
分类:其他好文   时间:2014-06-27 06:15:08    阅读次数:271
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!