11 2013 档案

c程序设计语言 导言
摘要:重在实践!!1-10 P13 1 #include 2 3 int main() 4 { 5 int c; 6 while((c = getchar()) != EOF) 7 { 8 int d = 0; 9 if (c == '\t')10 {11 printf("\\t");12 d = 1;13 }14 if (c == '\b')15 {16 printf("\\b");17 ... 阅读全文

posted @ 2013-11-25 20:08 Lingc· 阅读(315) 评论(0) 推荐(0)

句柄数不停增加
摘要:原来的程序:CSocketsock//开始循环开始//不出意外应该能够执行1500次左右然后挂掉sock.create(....//中间我好象还不止一次这么操作的循环结束sock.close()//这里结束现在的程序:循环开始//开始CSocketsocksock.create(....sock.close//在一切可能退出的地方都close一下循环结束//结束到底是什么原因使一个进程的句柄数不断增加,为什么句柄数增加到一定数目就会当呢?句柄有很多种(HDC,HPEN,HANDLE,HINSTANCE.....)它代表windows中的一种资源,比如你在重绘中用了HDC而使用完忘记释放它那么就 阅读全文

posted @ 2013-11-22 15:20 Lingc· 阅读(9004) 评论(1) 推荐(1)

算法竞赛入门经典 第二章 上机练习
摘要:明日继续 阅读全文

posted @ 2013-11-21 22:56 Lingc· 阅读(126) 评论(0) 推荐(0)

c++ primer敲代码第二章
摘要:今天越来越发现 学习一门编程语言,没有大量的code实践是不行的。看得快忘得更快。痛下决心,把primer的code习题一一实现。习题2.11 底数和指数,求结果#include using namespace std;int main(){ int base = 1; int exponent = 0; int result = 1; cin >> base >>exponent; for(int i = 0;i<exponent;i++) { result *= base; } cout<< result<<endl; r... 阅读全文

posted @ 2013-11-20 10:44 Lingc· 阅读(162) 评论(0) 推荐(0)

算法竞赛入门经典 第一章 上机练习
摘要://试验方法确定int型整数的最大最小值#include#include int main(){ int a = 0; while( a int main(void) { int i; for (i = 1; i > 0; i++) NULL; printf("%d %d\n", i, i-1); return 0; } double型浮点数能精确到多少位小数?#include intmain(void){ printf("%f", 10.0/3.0);//3.333333333333333481363069950020... 阅读全文

posted @ 2013-11-16 23:07 Lingc· 阅读(223) 评论(0) 推荐(0)

POJ2159 Ancient Cipher
摘要:题目很抽象,没有说明按哪种规则Substitution cipher,即A->? ~ Z->?并未说明,没有指明permutation cipher使用的数组,即怎么换序也不知道。确定的事:字母变换过程虽然未指明,但同一个字母肯定对应同一其他字母;学习内容:c++的I/O流;STL中的sort 对给定区间所有元素进行排序 ;#include //悲剧的WA#include //包含一组基础算法:置换、排序、合并、搜索等using namespace std;int main(){ const int maxlength = 100; //少于100个字母 char plate[.. 阅读全文

posted @ 2013-11-13 14:15 Lingc· 阅读(204) 评论(0) 推荐(0)

poj3299 Humidex
摘要:The humidex formula is as follows:humidex = temperature + hh = (0.5555)× (e - 10.0)e = 6.11 × exp [5417.7530 × ((1/273.16) - (1/(dewpoint+273.16)))]whereexp(x)is 2.718281828 raised to the exponentx.While humidex is just a number, radio announcers often announce it as if it were the te 阅读全文

posted @ 2013-11-06 13:41 Lingc· 阅读(289) 评论(0) 推荐(0)

导航

不知道不知道 知道不知道 知道知道 不知道知道。
天道酬勤,同志们共同努力!