码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
二进制数中1的个数
二进制数中1的个数 1 //不断地除2 2 int count1(int val) 3 { 4 int num = 0; 5 while(val) 6 { 7 if(val % 2 == 1) 8 num++; 9 va...
分类:其他好文   时间:2015-04-13 18:21:06    阅读次数:146
C语言实现的水仙花数
#include void main(){ int ge,shi,bai; for (int i =100; i < 1000; i++) { bai=i/100; shi=i%100/10; ge=i%100%10; if(bai*bai*bai+shi*shi*shi+ge*ge*ge==...
分类:编程语言   时间:2015-04-13 18:20:17    阅读次数:130
存储过程手工分页sql
CREATE procedure News_Class--资讯新闻百万级分页(@StrWhere varchar(100),--条件@PageSize int, --页面大小@PageIndex int --页面索引)ASdeclare @strSQL varchar(2000) -- 主语句dec...
分类:数据库   时间:2015-04-13 18:18:19    阅读次数:167
删除相同字符
#include "stdafx.h"#include #include void Squeeze(char s[],char c);int main(){char str[20],ch;printf_s("input a string:");gets_s(str);printf_s("input ...
分类:其他好文   时间:2015-04-13 18:14:43    阅读次数:114
9.5求积分
#include "stdafx.h"#include #include float fun1(float x);float fun2(float x);float Integral(float (*f)(float),float a,float b);int main(){float y1,y2;...
分类:其他好文   时间:2015-04-13 18:11:39    阅读次数:128
Swift 可选值
可选值(Optional value)有两种状态 1.它有一个值 2.它没有值Optional type是swift里面的一个新的概念上面的serverResponseCode就是一个Int?类型,上面代码代表serverResponseCode的两种不同状态在做一些不确定的操作的时候特别有用,比如...
分类:编程语言   时间:2015-04-13 18:09:17    阅读次数:141
htmlcxx取指定字段实例
#include #include #include #include #include #include #include using namespace std;using namespace htmlcxx;int main(){ std::string strHtml = "dddddd ....
分类:Web程序   时间:2015-04-13 18:08:14    阅读次数:172
字符串加空格
#include "stdafx.h"#include #include #include #define N 100void Insert(char s[]);int main(){char str[N];printf_s("input a string:");gets_s(str);Insert...
分类:其他好文   时间:2015-04-13 18:05:52    阅读次数:102
Swift 元组
元组是几种数据类型的一种组合,比如http404Error这个变量,它的实际类型是(Int,String)当然这个类型可以不显示写出来,系统可以自动推断访问元组中的某一个元素有不同的方法,出去上面同时获取元组中的所有元素,也可以按如下方式获取可以给元组里面的元素起名字,方便以后读取元组在函数传值的时...
分类:编程语言   时间:2015-04-13 18:04:27    阅读次数:115
switch 实现年月转换
#include "stdafx.h"#include #include int DayofYear(int year,int month, int day);void MonthDay(int year,int yearDay,int *pMonth,int *pDay);void Menu(vo...
分类:其他好文   时间:2015-04-13 18:04:20    阅读次数:138
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!