发一个KM~~~很简单的哟
C写的,代码清晰。算法很简单。。顶下扣大,早该学了 话说菜鸟不懂KM是什么意思呢 Nice,非常不错 算法用E语言应该是这样吧?
a = 到整数 (ID.内容)
i = 1
.计次循环首 (4, i)
a = a × 123 - 520
.计次循环尾 ()
a = a + 1
KEY.内容 = 到文本 (a)
#include <stdio.h>
void main()
{
int ID;
int KEY;
int tVal01;
int tVal02;
printf("Please enter your ID (Must be number):");
scanf("%d",&ID);
printf("Please enter your KEY (Must be number too):");
scanf("%d",&KEY);
tVal01 = ID;
for (tVal02=1; tVal02<5; tVal02++)
{
tVal01 = tVal01*0x7B - 0x208;
}
tVal01++;
printf("\n");
if ( KEY == tVal01 )
{
printf("Congratulation! Your ID and KEY is correct!\n");
}
else
{
printf("Your ID and KEY is incorrect! Please check them!\n");
}
//========================================================
// Print Correct KEY !
printf("Correct KEY is : %d \n", tVal01);
//========================================================
getch();
} 第一次玩km,我的处就献给扣扣牛了
#include <stdio.h>
int main()
{
int ID=scanf("%d",&ID);
int Key=scanf("%d",&Key);
int i;
for (i=1;i<5;i++)
ID=ID*123-520;
ID++;
if(ID==Key)
printf("yes\n");
else
printf("no\n");
return 0;
}
目测大概是这样
0,0楼上两位大神如此神速不得不佩服 4次
ans*123-520
后加1 好吧。最近学C学傻了忘了易语言计次循环有自己加的功能。 着实不懂 KM是什么东东
页:
[1]