码迷,mamicode.com
首页 >  
搜索关键字:else    ( 23991个结果
POJ-1005
#include #include //#include using namespace std; #define PI 3.1415926 /* return: years */ int recursionFunc(float rCurrent, float xYMin){ float r; if(rCurrent==0){ r=sqrt(100.0/PI); }else{ ...
分类:其他好文   时间:2015-07-11 06:44:28    阅读次数:89
POJ-1003
#include using namespace std; int recursionFunc(int cardNum, float len){ if(1.0/(cardNum+1)>=len){ return cardNum; }else{ return recursionFunc(cardNum+1, len-(1.0/(cardNum+1))); } } int main(...
分类:其他好文   时间:2015-07-10 23:45:24    阅读次数:129
c语言推断数是否是素数
这是推断数是否是素数。网络版非常。我觉得有点问题。今天一个朋友问我这个问题。我知道,今天,我把自己的代码,非常实用哦!。#include#includeint Prime(unsigned int a){ unsigned int i; int k=0; if (a==1) k=1; else f....
分类:编程语言   时间:2015-07-10 22:11:50    阅读次数:212
C#基础学习第三天(.net菜鸟的成长之路-零基础到精通)
1、复合赋值运算符 += -= *= /= %=2、关系运算符 > = if结构 --->if-else结构 选择结构(用于多条件的判断,超过两种就算是多条件) -->if else-if结构 -->switch-case结构 循环结构 -->while循环 -->do-while循环 -->for...
分类:Windows程序   时间:2015-07-10 18:30:53    阅读次数:120
自动回复微信消息
valid();}else{$testObj->responseMsg();}exit;classWechat{/***绑定url、token信息*/publicfunctionvalid(){$echoStr=$_GET["echostr"];if($this->checkSignature())...
分类:微信   时间:2015-07-10 18:16:03    阅读次数:380
页面查看模式下,将元素转为文本展示
function view(type) { var dmt,bar; indexOfExpend(); if (type == 1) { dmt = $(document); bar = $(parent.document); } else { ...
分类:其他好文   时间:2015-07-10 16:34:26    阅读次数:111
Matlab Newton‘s method
定义函数function y=f(x)y=f(x)。%函数f(x)的表达式endfunction z=h(x)z=h(x)。%函数h(x)的表达式end主程序x=X;%迭代初值i=0;%迭代次数计算while i0.01;%收敛推断X=x0;else breakendi=i+1;endfprintf...
分类:其他好文   时间:2015-07-10 10:54:34    阅读次数:125
默认选中性别
$(function(){//默认选中性别 var sex=""; if(sex=="male"){ $('input[id="male"]').attr("checked",true); }else{ $('input[id="famale"]').attr("c...
分类:其他好文   时间:2015-07-09 19:40:22    阅读次数:140
三目运算符与if else的运行效率
两者的效率比较:当比较次数较少时,效率一样;当比较次数较多时,发现ifelse的速度更快,应该是其汇编指令更少的原因。if else的汇编代码如下:三目运算符代码如下:
分类:其他好文   时间:2015-07-09 17:55:22    阅读次数:267
28.字符串的排列
void Permutation(char*  pStr) { if (pStr == NULL) return; Permutation(pStr, pStr); } void Permutation(char* pStr, char* pBegin) { if (*pBegin == '\0') { printf("%s\n", pStr); } else { fo...
分类:其他好文   时间:2015-07-09 16:09:51    阅读次数:120
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!