Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¸ÕѧC£¬ÓÃCʵÏÖ±àÂë - C/C++ / CÓïÑÔ

#include"stdio.h"
#include"stdlib.h"
void ContrTwo(char i)
{
char str1[8];
itoa(i,str1,2);
printf("%s",str1);
}
unsigned char leftRot(char str,int i);
unsigned char DEVC(char str,char g);
unsigned char mAdd(char str,char r);
void main()
{
char Pstr,Scma,R,TerMa;
printf("Ñ­»·±àÂë\n");
printf("ÇëÊäÈëÐÅÏ¢Âëm(x)£º");
scanf("%c",&Pstr);
printf("\nÇëÊäÈëÉú³ÉÂë×Ög(x)£º");
scanf("%c",&Scma);
Pstr=leftRot(Pstr,4);
R=DEVC(Pstr,Scma);
TerMa=mAdd(Pstr,R);
ContrTwo(TerMa);
}
unsigned char leftRot(char str,int i)//Ïò×óÒÆËÄλ
{
str=str<<i;
return str;
}
unsigned char DEVC(char str,char g)//µÃµ½¼à¶½Óàʽ
{
int i;
for(i=4;i>=2;i--)
{
g=leftRot(g,i);
str=str^g;
}
return str;
}
unsigned char mAdd(char str,char r)//µÃµ½±àÂë
{
char c;
c=leftRot(str,4);
c=str^r;
return c;
}
--------------------
µ±ÊäÈë101ʱÐÅÏ¢Âð¶ÔÓ¦µÄ5ºÍÊäÈë0111¶ÔÓ¦µÄ7ʱÔõôµÃ²»µ½¶ÔÓ¦µÄ´ð°¸£¿

  ±àÂë²½Ö裺
  £±¡¢n-k=r=7-3=4,ÓÃx4³Ëm(x)µÄÔËËãʵ
  ¼ÊÉÏÏ൱ÓÚÔÚÐÅÏ¢Âë110ºó¸½ÉÏ4¸ö
  0,±äΪ1100000
  £²¡¢ÓÃxrm(x)=x4(x2+x)=x6+x5³ýÒÔg(x),
  Èçͼ(a)Ëùʾ,µÃµ½¼à¶½Óàʽr(x)=x2+1¡£
&


Ïà¹ØÎÊ´ð£º

ÓÃC»òC++ÈçºÎ±àдÇó½â3Dħ·½³ÌÐò - C/C++ / C++ ÓïÑÔ

ÇëÎÊÓÃC»òC++ÈçºÎ±àдÇó½â3Dħ·½µÄ³ÌÐò£¬¸Ã´ÓºÎ¿ªÊ¼£¿
лл¸÷룬°ïæÌáµã½¨Òé°É¡£

http://www.mofang.net/code/176/182/6581.html

ÎÒÖ»ÄÜÍ»ÆÆ60Ã룡°¦¡£

ÎÒ¸Õ¹ý40Ãë

googleµÄandroidÖÐÓиöOpenGL ES + ......

c,c++Á¬½Ómysql ÕÒ²»µ½Í·²¿Îļþ£¨ÐÂÊÖ£©

±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......

¼±£¡C parserÈçºÎʵÏÖ¡°__builtin_va_list¡±

×î½üÔÚ¿´Ò»¸öÓÃbisonʵÏÖµÄC parser,OSÊÇopensolaris¡£µ±ÓÃËüÀ´½âÎöÒ»¸ö¼òµ¥µÄhello.cʱ£¬³öÏÖ¡°/usr/include/sys/va_list.h: parse error before __gnuc_va_list¡±¡£´ò¿ªÎļþva_list.hºó·¢ÏÖÕâÑùÒ»ÐС°typedef __bu ......

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

c#¿ØÖÆMysql ʵÏÖ×Ô¶¯É¾³ý¹¦ÄÜ - .NET¼¼Êõ / C#

Óиöwinform³ÌÐò,ʹÓÃc#+mysql,ÐèÒªÔÚÒ»¸ö´°ÌåÉèÖÃmysql×Ô¶¯É¾³ý¹¦ÄÜ,°üÀ¨×Ô¶¯É¾³ý¶àÉÙÌì֮ǰµÄÊý¾ÝÒÔ¼°ÊÇ·ñ¿ªÆô×Ô¶¯É¾³ý¹¦ÄÜ,ÎÒ³ÌÐòÍ˳öºó,»¹Ôõô¿ØÖÆMysql×Ô¼ºÉ¾³ý°¡?ÊDz»ÊÇÒªÓÃmysqlµÄeventÀ´ÊµÏÖ?c#¿ÉÒÔµ÷ÓÃmysq ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ