摘要:
using System;namespace 九九乘法表{class MulTable{[STAThread]static void Main(string[] args){DateTime startTime = DateTime.Now;Console.Write("设置乘法表的范围(整数)/n" +"n = ");int n = int.Parse(Console.ReadLine());MulTable m = new MulTable(n);System.TimeSpan t = DateTime.Now - startTime;Console 阅读全文
posted @ 2006-01-02 16:01
rousya
阅读(741)
评论(0)
推荐(0)
摘要:
//用Java实现的字符串简单加密://用一个字符串 Key 加密原串//请高手提提意见哦 //JDK 5.0编译通过import javax.swing.*;import java.awt.*;import java.awt.event.*;import java.io.*;import javax.swing.border.*;class Mima{ char key; public static void main(String[] args) throws Exception{ new Mima(); } public Mima(){ MyGui tw = new MyGui(&quo 阅读全文
posted @ 2006-01-02 13:56
rousya
阅读(3497)
评论(0)
推荐(0)
摘要:
;两个整数是用非压缩型的BCD码存储的;任意长度的两个数的加法;输入的非数字字符将被忽略dsegsegmentmsg1 db"Please input the first number:",0dh,0ah,"$"msg2db"Please input the second number:",0dh,0ah,"$"remsgdb"The reslut is:$"msg3db"Any ket to quit$"b1_lendw0buf_1db100dup(0)b2_lendw0b 阅读全文
posted @ 2006-01-02 13:39
rousya
阅读(482)
评论(0)
推荐(0)
摘要:
在程序中嵌入汇编语句,直接读出CPU的机器周期。http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=211457你需要多精确? GetTickCount可以到18-20ms进度 timeGetTime可以到1ms精度 …… 当然这些都不是C or c++ 标准支持的。 那么就要祭出最牛奔的方法, 直接读取CPU开机以来执行的机器周期数, 一条汇编指令:RDTSC (就是 ReaD TimeStamp Count) 精度可以达到ns级别。(准确地说精度是1 / 你的CPU的时钟频率,这也是极限) long HighStart,... 阅读全文
posted @ 2006-01-02 11:46
rousya
阅读(599)
评论(0)
推荐(0)