- UID
- 32691
注册时间2007-8-2
阅读权限20
最后登录1970-1-1
以武会友
 
TA的每日心情 | 开心 2019-2-6 23:35 |
---|
签到天数: 1 天 [LV.1]初来乍到
|
发表于 2009-3-30 13:39:51
|
显示全部楼层
学习了,C代码如下
#include <iostream>
#include <cstring>
using namespace std;
int main(int argc, char *argv[])
{
cout << "Hello, world" << endl;
long esi = 1;
char mcode[10];
char key[10];
memset(key, 0, sizeof(key));
cout << "Enter mcode: ";
cin >> mcode;
long edx, ecx;
for(int bl = 0; bl < strlen(mcode); ++bl){
edx = mcode[bl];
ecx = esi;
ecx = ecx >> 8;
edx = edx ^ ecx;
key[bl] = edx;
esi = esi + key[bl];
esi = esi * 2 + 3;
}
cout << "key: " << key << endl;
return 0;
}
不过怎么还有试用次数的提示呢? |
|