2015年10月16日

归并排序/合并排序c++实现

摘要: #include #includeusing namespace std;class merges{public:void merge(int *a,int low,int mid,int high){ int i,j,k; i=low; j=0;//********** k... 阅读全文

posted @ 2015-10-16 18:29 邗影 阅读(341) 评论(0) 推荐(0)

2015年10月4日

3*(4+6)-7 # 用代码实现这个运算表达式,仅包含逆波兰式部分,算术结果部分未写出

摘要: #include#include#includeusing namespace std;void pr(char *str){ cout s1(strlen(str)); vector s2(strlen(str)); int i=0; while(str[i]!='\0')... 阅读全文

posted @ 2015-10-04 14:50 邗影 阅读(287) 评论(0) 推荐(0)

2015年10月3日

给出一个十六进制的数0xFF 0x80 (只有2“位”) 将其转换成有符号的一字节的十进制整数

摘要: #include #include#include #includeusing namespace std;int main(){ char ch[8]; char ch2[8]={'0','0','0','0','0','0','0','0'}; ltoa(strtol("0xb... 阅读全文

posted @ 2015-10-03 15:18 邗影 阅读(3610) 评论(0) 推荐(0)

2015年10月1日

给一文本, 找出所有包含“某单词”的句子并输出

摘要: package pack1; import java.io.BufferedReader;import java.io.File;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOExcep 阅读全文

posted @ 2015-10-01 15:41 邗影 阅读(910) 评论(3) 推荐(0)

2015年9月30日

给一字符串, 输出第一个出现两次的字母

摘要: package pack1; import java.util.Arrays;import java.util.Scanner; public class one { void search(String str){ int len=str.length(); char arr[]=str.toCh 阅读全文

posted @ 2015-09-30 12:56 邗影 阅读(776) 评论(2) 推荐(0)

2015年9月3日

二分查找

摘要: 二分查找 阅读全文

posted @ 2015-09-03 21:27 邗影 阅读(304) 评论(0) 推荐(0)

2015年9月2日

java中的nextline()

摘要: 转自:gold_worker http://www.cnblogs.com/gold-worker/archive/2013/04/10/3013063.htmlJava中Scanner的nextInt(),next(),nextLine()方法总结今天在java上机课时遇到了个小问题,使用Sc... 阅读全文

posted @ 2015-09-02 10:13 邗影 阅读(852) 评论(0) 推荐(0)

2015年8月17日

链表创建途中遇到的问题

摘要: #include <iostream> #include<new> using namespace std; struct node{ int data; node *next; }; class list{ public: node *head; list(){head=null}; list(i 阅读全文

posted @ 2015-08-17 11:13 邗影 阅读(274) 评论(0) 推荐(0)

2014年4月14日

cipher的各个模式

摘要: block cipher 工作模式(引自百度)Electronic Codebook Mode 最经典的模式,把明文按64比特为单位分为block, 对所有block使用同样的密钥来加密,最后把输出的密文块连接起来,成为最后的密文。Cipher Block Chainning Mode 使用Elec... 阅读全文

posted @ 2014-04-14 15:04 邗影 阅读(1172) 评论(0) 推荐(0)

2014年4月8日

控制台输出到txt

摘要: //PrintStream 为其他输出流添加了功能,使它们能够方便地打印各种数据值表示形式。//PrintStream不同于PrintWriter,PrintStream输出的是字节内容。//public PrintStream(OutputStreamout)创建新的打印流。PrintStream ps=new PrintStream(new FileOutputStream(new File("文件名.txt"),true));//第二个参数是免覆盖免去用inputstream。fileinputstream,bufferedwriter(字节,字符,缓冲,数组,数据, 阅读全文

posted @ 2014-04-08 14:53 邗影 阅读(518) 评论(0) 推荐(0)

导航