码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
状态问题吗?水题错四次了…………
#includemain(){int n,i,sum;int x[10];while(scanf("%d %d %d %d %d %d",&x[1],&x[2],&x[3],&x[4],&x[5],&x[6])!=EOF){if(x[1]==0&&x[2]==0&&x[3]==0&&x[4]==0&...
分类:其他好文   时间:2014-07-22 22:46:14    阅读次数:210
拓扑排序
#include #include #include using namespace std;#define N 505int ma[N][N],ans[N],indegree[N];int main(){ int i,j,n,m; while(~scanf("%d %d",&n,&m)...
分类:其他好文   时间:2014-07-22 22:44:55    阅读次数:170
topsort
#include #include #include using namespace std;#define N 505int ma[N][N],ans[N],indegree[N];int main(){ int i,j,n,m; while(~scanf("%d %d",&n,&m)...
分类:其他好文   时间:2014-07-22 22:44:52    阅读次数:141
NOIP2013 题解
转圈游戏 题解:快速幂 1 #include 2 3 int n, m, k, x; 4 5 inline long long QuickPow(int a, int k, int MOD){ 6 long long base = a, ret = 1; 7 while (k...
分类:其他好文   时间:2014-07-22 22:44:34    阅读次数:284
【HDOJ】2369 Broken Keyboard
字符串。 1 #include 2 #include 3 4 int visit[130]; 5 char s[1000005]; 6 7 int main() { 8 int n, len; 9 int i, j, k, tmp, l;10 11 while (sc...
分类:其他好文   时间:2014-07-22 22:40:53    阅读次数:210
Centos 6.5中安装后不能打开emacs的问题
问题的发现过程: 安装了最新的centos版本后发现居然打不开emacs,然后在终端中输入emacs后还是不能打开,出现了下面的提示: emacs: error while loading shared libraries: libotf.so.0: cannot open shared objec...
分类:其他好文   时间:2014-07-22 22:40:13    阅读次数:190
2014年辛星Javascript解读第五节 break continue 与异常处理
先说一下break和continue的主要用法吧,break用于跳出循环,continue用于跳过该循环中的一个迭代。简单的说,就是break直接从该语句跳出,但是continue不会跳出该循环语句,但是它会重新来过,即本次不会再次执行。   ************具体说明************* 1.我们通过举例的形式来说明,首先看代码一: var sum = 0...
分类:编程语言   时间:2014-07-22 14:06:04    阅读次数:302
P50
#include #include int fun (int high) { int sum=0,n=0,j,yes; while((high>=2)&&(n<10)) { yes=1; for(j=2;j<=high/2;j++) if(high%j==0) { yes=0;break; } if(yes) { sum+=high; ...
分类:其他好文   时间:2014-07-22 00:11:34    阅读次数:226
P52
#include void fun(long s,long *t) { int d; long s1=1; *t=0; while(s>0) { d=s%10; if(d%2!=0) { *t=d*s1+*t;s1*=10; } s/=10; } } void main() { long s,t; printf("\nPlease enter s:"); ...
分类:其他好文   时间:2014-07-22 00:08:33    阅读次数:189
字符串截取
//$str 待截取的字符串//$len 截取的字符个数//$chars 已经截取的字符数//$res 保存的字符串//$chars 保存已经截取的字符串个数//$offset 截取的偏移量//$length 字符串的字节数//若$len>$str的字符个数,造成无谓的while循环,($off.....
分类:其他好文   时间:2014-07-22 00:00:36    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!