码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
exercises 2.34
1 #include 2 using namespace std; 3 4 5 int main() 6 { 7 int i=0,&r=i; 8 auto a=r; 9 10 const int ci=i,&cr=ci;...
分类:其他好文   时间:2015-04-13 20:35:42    阅读次数:107
continue 打出偶数
static void Main(string[] args) { while (true) { for (int i = 1; i <= 100; i++) { if (i%2==1) //遇到奇数就continue最后打出的都是偶数 { continue; } Console.Write(i+....
分类:其他好文   时间:2015-04-13 20:35:04    阅读次数:104
数组定义、初始化及其属性
一维数组定义:int[] myAr;一维数组申明及其初始化: 申明数组,并制定数组的长度: int[] myArr=new int[](5); 如果用花括号初始化数组,则 还可以 不指定数组的大小 ,因为编译器会自 动统计元素的个数 :int[] myArr=new int[]{4,7, ...
分类:编程语言   时间:2015-04-13 20:30:52    阅读次数:129
常见sql数据类型
数值型类型INT从-231到-231-1的整型数据,存储大小2个字节SMALLLINT从-32768到32767的整数数据,存储大小4个字节TINYINT0~255的整数类型,存储大小1个位DECIMAL([,q])十进制数,共p位,小数点后面q位FLOAT双字长浮点数字符型数据CHAR(n)长度为...
分类:数据库   时间:2015-04-13 20:30:49    阅读次数:188
c 查找A字符串在B字符串中是否存在,计算出现的次数
主要是应用了头文件中的strstr函数char * strstr(const char *s1, const char *s2);查找是否存在: 1 #include 2 #include 3 int main(void) 4 { 5 char str3[] = {"abcabcda...
分类:其他好文   时间:2015-04-13 20:27:35    阅读次数:126
求一个字符串中连续出现次数最多的子串
#include#includeusing namespace std;int main(void){ int pos1,pos2,pos3,offset,temp=1,count=0; string str="bcdcdcdcdcdcdbcdasfabababds"; ...
分类:其他好文   时间:2015-04-13 20:24:37    阅读次数:96
UVa 10954 (Huffman 优先队列) Add All
直接用一个优先队列去模拟Huffman树的建立过程。每次取优先队列前两个数,然后累加其和,把这个和在放入到优先队列中去。 1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int n; 8 whi...
分类:其他好文   时间:2015-04-13 20:22:15    阅读次数:192
30分钟泛型教程
一、泛型入门:我们先来看一个最为常见的泛型类型List的定义(真正的定义比这个要复杂的多,我这里删掉了很多东西)[Serializable]public class List : IList, ICollection, IEnumerable{ public T this[int index]...
分类:其他好文   时间:2015-04-13 20:20:05    阅读次数:126
poj 1321
思路:有点枚举的意思 基本的分支限界#include#includeusing namespace std;int a[11];char map[11][11];int n,k;int sum;void dfs(int t,int x)// 行号 需要放置的皇后数{ int i,j; i...
分类:其他好文   时间:2015-04-13 20:19:33    阅读次数:118
Integer 中的缓存类IntegerCache
2014年去某公司笔试的时候遇到这么一道题:public class Test { public static void main(String[] args) { Integer int1 = Integer.valueOf("100"); Integer int...
分类:系统相关   时间:2015-04-13 20:17:04    阅读次数:201
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!