CÖеÄһЩСÎÊÌâ¡£¡£¡£
/* Note:Your choice is C IDE
×÷Óãº Ëæ»úÊý¼ÓÃÜ·¨£¬£¬£¬£¬
ÒÔÏÂÓÐÐí¶à²»¶®£¬Çë½Ìһϣ¬ÇëÖ÷Òâ´úÂë;
*/
#include <stdio.h>
#include <stdlib.h>
union
{
int value;
struct
{
char first;
char second;
}fran;
}num;
main()
{
FILE *fp,*name2; /* name2λ¼ÓÃÜ´æ·ÅµÄÎļþ */
int i,t,len,k1,k2,k3,k4,k5;
float j;
char name1,buf[60000]; /* name1λÓû§ÊäÈëµÄÒª½øÐмÓÃܵÄÎļþ */
printf("\n input filename that you want to lock or open:");
scanf("%s",name1);
if((fp=fopen(name1,"rb"))==NULL) /* ÒÔÖ»¶ÁµÄ·½Ê½´ò¿ªÒ»¸ö¶þ½øÖÆÎļþ */
{
printf("File cannot be opened\n");
exit(1);
}
else
printf("File opened for encrypt\n");
j=filelength(name1);
printf("\ninput key1:");
gets(k1);
printf("\ninput key2:");
gets(k2);
printf("\ninput key3:");
gets(k3);
srand(k1);
for(i=0;i<k2;i++)
{
k4=rand(); ///////Õâ¸öFOR±íʾʲôÒâ˼£¬K4Ò²¾ÍÊÇ×îºóÒ»¸öÖµ£¬ÓÐʲô×÷Óã¿
}
k5=(k3+k2)/2; ///////////Õâ¾äÊÇʲôÒâ˼£¿
for(i=0;i<j;i++)
{
num.value=rand();
if(num.fran.first<=33) //////////num.fran.firstÊÇʲôÒâ˼£¿
num.fran.first=num.fran.first+33;
buf[i]=num.fran.first^buf[i]; /* ½øÐÐÒì»ò
Ïà¹ØÎÊ´ð£º
±àÒëÆÕͨµÄcûÎÊÌâ°¡£¬µ«±àÒëjavahÉú³ÉµÄ¾Í±¨´í£º
gcc -O0 -g3 -Wall -c -fmessage-length=0 -oHelloWorld.o ..\HelloWorld.c
gcc -otest.exe HelloWorld.o
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../. ......
µØµãÔÚÉîÛÚÄÏɽ
¡¡¡¡×öCÈí¼þ¡£ÊÔÓÃ2K£¬²»ÖªµÀתÕý¸ø¹«Ë¾Ì¸¶àÉÙºÏÊʰ¡£¿
¡¡¡¡ÁíÍ⣬±¾ÈËС±¾£¬Ó¢ÓïÁù¼¶£¬ÊÔÓÃÈý¸öÔ±íÏÖµÃÒ²ËãÖÐÉÏˮƽ¡£µ«ÊÇÏÖÔÚ»¹²»ÄÜ×öÏîÄ¿¡£ÁíÍâ±ÏҵѧУûÓÐÃûÆø¡£
¡¡¡¡×ªÕý¸ø¹«Ë¾Ì¸¶àÉ ......
ÄãÃÇÏÖÔÚ»¹ÔÚÓÃCÂð£¿CÓÐǰ;Âð£¿
Ò»¶¨£¬²¢ÓÀÔ¶¼á³Ö
ÒýÓÃ
Ò»¶¨£¬²¢ÓÀÔ¶¼á³Ö
¶¥
ÓÐÓá£
Â¥Ö÷ºÎ³ö´ËÑÔ
Â¥Ö÷À´c°æÎÊÕâ¸öÎÊÌâÊÇÌß¹ÝÓÃÒâÂð¹þ¹þ
Ô½À´Ô½ÀäÊǿ϶¨µÄ£¬ÍêÈ«ÌÔ̵¹Ò²Ã»ÄÇôÈÝÒ×
c ......
¹¦ÄÜÊÇʵÏÖ×Ö·û´®µÄ·×ª£¬²»ÖªµÀÄÄÀïÓдíÎó£¬ÇëÖ¸½Ì
#include <iostream>
#include <stdio.h>
using namespace std;
void reverse()
{
char ch;
scanf("%c",ch) ......
#include <stdio.h>
main()
{
int a,b,sum;
a=1;b=2;
sum=a+b;
printf("sum is %d\n");
}
½á¹ûÊÇ£º2367460
Ϊʲô£¿
printf("sum is %d\n", ......