码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
JavaScript
1. 变量提升: 只对var声明的变量有效。 2. 标识符:数字,下划线,unicode字母,数字不能开头。 3. switch与case的值比较使用严格相等=== 4.do{}while(); 记住加分号。 5. 标签top: 使用break top; 跳到标签 6.数据类型number,stri...
分类:编程语言   时间:2014-07-23 15:05:56    阅读次数:208
STM32跑马灯
#include "stm32f10x.h" #include "led.h" #include "delay.h" #include "sys.h" int main(void) { delay_init(); LED_Init(); while(1) { LED0=0; LED1=1; delay_ms(300); LED0=1; LED1=0; delay_ms...
分类:其他好文   时间:2014-07-23 13:34:56    阅读次数:249
HDU 1097 A hard puzzle
#include int main() { int a,b; while(scanf("%d%d",&a,&b)!=EOF) { int i,last; a=a%10; b=b%4; last=a;//必须在此处将a的值赋给last if(b==0) b=4; for(i=1;i<b;i++) { last=a*last%10; } printf...
分类:其他好文   时间:2014-07-23 13:23:26    阅读次数:282
ios除去可变字符串中的某些字符
//除去字符串中的“111@” NSMutableString *str = [[NSMutableString alloc]initWithFormat:@"111@sudhqu111@lgkokge"];     while ([str rangeOfString:@"111@"].length>0)     {         [str deleteCharactersI...
分类:移动开发   时间:2014-07-23 13:16:26    阅读次数:194
HDU 4861 Couple doubi
打表后可知,ball的值为1~p-1的循环;且只有第p-1个球不为0;所以,只有k/(p-1)个球不为0,且它们的值相等。 1 #include 2 using namespace std; 3 4 int main (){ 5 int k,p; 6 while (cin>>k>...
分类:其他好文   时间:2014-07-23 12:30:56    阅读次数:178
[SCOI2007] 修车
属于我的费用流版本终于诞生了!想来还有点小激动呢…看了下模板,之后完全按照自己的想象来写,这样在考场上也不怕啦~某人说其实费用流就是把Dinic里的BFS换成SPFA,似乎还是比较有道理的,就是addflow要做一些修改,我第一次的错误就是addflow里的循环写成了while pre[x]st d...
分类:其他好文   时间:2014-07-23 12:00:17    阅读次数:297
poj 1611 The Suspects
并查集 简单题 1 #include 2 #include 3 int par[1000]; 4 int Find(int x) 5 { 6 while(par[x] >= 0) 7 x = par[x]; 8 return x; 9 }10 void Merge(i...
分类:其他好文   时间:2014-07-23 11:59:06    阅读次数:227
hdu 1232
并查集 入门题 1 #include 2 #include 3 int par[1000]; 4 int Find(int x) 5 { 6 while(par[x] > 0) 7 x = par[x]; 8 return x; 9 }10 void Merge(in...
分类:其他好文   时间:2014-07-23 11:58:18    阅读次数:169
1、打印二进制机器码,程序内存分析,大端序小端序,指针数组,数组指针,数组的三种访问方式,typedef,#if-0-#endif,求数组大小,括号表达式
?? 1.打印二进制机器码(分别表示32位的和64位的) #include   /*按照8位的长度打印一个数值*/ void dis8bit(char val) {    int bit = 8;    while(bit--)     {        if(1            printf("1");      ...
分类:其他好文   时间:2014-07-22 23:48:57    阅读次数:408
leetcode reverse integer
public class Solution { public int reverse(int x) { int ret=0; while(x!=0) { int t=x%10; ret=ret*10+t; ...
分类:其他好文   时间:2014-07-22 23:25:57    阅读次数:213
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!