摘要: (1)编写基本的nslookup程序§ 实验要求:实现一个既可以支持命令行输入,也可以进行交互式输入的基本nslookup程序。要求实现域名和IP地址间的转换(输入域名输出IPV4地址;输入IP地址输出域名(对于得不到域名的情况会返回IP地址,可以直接输出这个IP... 阅读全文
posted @ 2015-12-10 11:23 Victor_Lv 阅读(568) 评论(0) 推荐(0) 编辑
摘要: “CString 是MFC或者ATL中的实现,string是C++标准库中的实现string和CString均是字符串模板类,string为标准模板类(STL)定义的字符串类,已经纳入C++标准之中; CString(typedef CStringT> CStrin... 阅读全文
posted @ 2015-12-08 12:18 Victor_Lv 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 代码:#include #include using namespace std;int main(){ string a("hha"); string b("hha好"); cout<<a.size()<<endl<<b.size()<<endl; cout<<a.... 阅读全文
posted @ 2015-12-08 12:12 Victor_Lv 阅读(1324) 评论(0) 推荐(0) 编辑
摘要: 题目描述:编写一个程序(Fruit.java),其中有三个类:Fruit,Orange、Apple,其中,Orange、Apple是Fruit的子类:(1)类Fruit有eat()和main()(入口函数)两个方法,没有数据域,其中eat()中用this.getCla... 阅读全文
posted @ 2015-12-04 12:46 Victor_Lv 阅读(417) 评论(0) 推荐(0) 编辑
摘要: 题目描述:找出html文件(vacation.htm)中的所有标签名并显示出来。*不要使用正则表达式。代码:import java.io.*;class ShowTags{ public static void main(String[] args)throws I... 阅读全文
posted @ 2015-12-04 12:41 Victor_Lv 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 题目描述:统计文件poem.txt中"春、天、水、花"四个字符出现的次数。代码:import java.io.*;import java.util.Arrays;public class StringTest{ public static void main(Str... 阅读全文
posted @ 2015-12-04 12:35 Victor_Lv 阅读(694) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(Fib.java)斐波那契数列(Fibonacci sequence):第0项是0,第1项是1,从第2项开始,每一项都等于前两项之和,结果是0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584... 阅读全文
posted @ 2015-12-04 12:28 Victor_Lv 阅读(581) 评论(0) 推荐(0) 编辑
摘要: 题目描述There are five numbers 1,2,3,4 and 5,now you can see four of them,do you know what is the remaining one?输入格式 Four different integ... 阅读全文
posted @ 2015-11-28 23:32 Victor_Lv 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Write a program that reads an integer with 3 digits and adds all the digits in the integer.For example,if an integer is 932,the s... 阅读全文
posted @ 2015-11-28 22:45 Victor_Lv 阅读(1237) 评论(0) 推荐(0) 编辑
摘要: 题目描述Given two postive integers A and B, please calculate the maximum integer C that C*B≤A, and the real number D equal to A/B.输入格式Two... 阅读全文
posted @ 2015-11-28 22:12 Victor_Lv 阅读(6345) 评论(0) 推荐(0) 编辑