码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
nyist 22 素数求和
#includeint main(){int m,n,i,j,a,b;scanf("%d\n",&m);while(m--) // m组数据 { int sum=0; scanf("%d\n",&n); // 某一组 n个数 for(i=0;i<n;i+...
分类:其他好文   时间:2014-08-06 01:38:30    阅读次数:177
15.求函数:sin(x)=x/1! - x3/3! + x5/5! -x7/7! +…,最后一项精度不低于0.000001
#include using namespace std;int main(){ double x,sinx=0.0,jbf,j=1.0; cin>>x; jbf=x; int k=1,l=1; double n=1; while(j>=1e-6) { j=jbf/n; s...
分类:其他好文   时间:2014-08-05 22:25:40    阅读次数:259
js循环GridView判断CheckBox是否全部未选中
functionisQueryPriceReplyProduct(){ vargridItem; varitemIndex=0; varIDS=''; while(gridItem=dgQueryPriceReplyProduct.Table.GetRow(itemIndex)){ ...
分类:Web程序   时间:2014-08-05 22:05:00    阅读次数:220
Set Matrix Zeroes
问题:将数组中的某个值为0的元素所在行和列的其他值都为0分析;遍历数组找到某一值为0然后遍历他的上下左右直到边界,要用while而不能用搜索,因为搜索过去新节点的操作以旧结点一样的操作 要用一个新数组,不然原数组修改后会影响到下次的查找class Solution {public: vo...
分类:其他好文   时间:2014-08-05 21:59:30    阅读次数:176
Java Thread dump
1. 发送信号 * In Unix, use "kill -3 <pid>" where pid is the Process ID of the JVM.(kill 信号列表) * In Windows, press CTRL+BREAK on the window where the JVM is running. 2. jstack -l pid.? http:/...
分类:编程语言   时间:2014-08-05 19:40:00    阅读次数:300
HDU 4915 Parenthese sequence _(:зゝ∠)_ 呵呵
呵呵不是我做的 #include #include #include const int N = 1000000 + 10; char s[N]; int d[N], num[N]; int main() { while (~scanf("%s", s)) { memset(num, 0, sizeof num); int len = strlen...
分类:其他好文   时间:2014-08-05 19:25:10    阅读次数:218
HDU 4920 稀疏矩阵相乘
暴力啊,不要想太多 T^T g艹太坑爹了 #include #include #include using namespace std; const int MAX_N = 807; int n; int a[MAX_N][MAX_N], b[MAX_N][MAX_N]; int c[MAX_N][MAX_N]; int main() { while (1 == scan...
分类:其他好文   时间:2014-08-05 19:24:11    阅读次数:251
break和continue语句
跳转语句中断当前的执行过程,C++语言提供了4中跳转语句:break、continue、goto和return。break语句break语句负责终止离他最近的while、do while、for或switch语句,并从这些语句之后的第一条语句开始继续执行。break语句只能出现在迭代语句或者swit...
分类:其他好文   时间:2014-08-05 18:31:00    阅读次数:250
CodeForces 22C System Administrator
把v和2结点交换, 1和v连,其他点和v之间可以互相连。 #include #include #include #include #include #include #include using namespace std; int n,m,v,flag,i,cnt,j; int main() { while(~scanf("%d%d%d",&n,&m,&...
分类:其他好文   时间:2014-08-05 14:12:59    阅读次数:185
js循环GridView判断CheckBox是否全部未选中
function isQueryPriceReplyProduct() { var gridItem; var itemIndex = 0; var IDS = ''; while (gridItem = dgQueryPriceReplyProduct.Ta...
分类:Web程序   时间:2014-08-05 13:36:59    阅读次数:225
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!