答案
??
fief
ok
答案
ok
是真的回复了就能看吗
。。
0只会二进制
1二进制语言
2···
3··
4不能
5···
6···
7···
#include<io.h>
#include<direct.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 256
long total;
int countLines(const char*filename);
void findAllCodes(const char*path);
void fingALLFiles(const char*path);
int ciuntLines(const char*filename)
{
FILE*fp;
int count=0;
int temp;
if ((fp=fopen(filename,"r"))==NULL)
{
fprintf(stderr,"Can not openthe file:%s\n",filename);
return 0;
}
while((temp=fgetc(fp))!=EOF)
{
if(temp=='\n')
{
count++;
}
}
fclose(fp);
return count;
}
void findAllCodes(const char*path)
{
struct_finddata_t fa;
long handle;
char thePath,target;
strcpy(thePath,path);
if((handle=_findfirst(strcat(thePath,"/*.c"),&fa))!=-1L)
{
do
{
sprintf(target,"%s/%s",path,fa.name);
total+=countLines(target);
}
while(findnext(handle,&fa)==0);
}
_findclose(handle);
}
void findALLDirs(const char*path)
{
struct_finddata_t fa;
long handle;
char thePath;
strcpy(theaPath,path);
if((handle=_findfirst(strcat(thePath,"/*),&fa))==-1L)
{
fprintf(stderr,"The path %s iswrong!\n",path);
return;
}
do
{
if(!stcmp(fa.name,".")|| !strcmp(fa.name,".."))
contiue;
if(fa.attrib==_A_SUBDIR)
{
sprintf(thePath,"%s/%s",path,fa.name);
findAllCodes(thePath);
findALLDIRS(thePath);
}
}while(_findnext(handle,&fa)==0);
_findclose(handle);
}
int main()
{
char path=".";
printf("计算中…\n");
findAllCodes(path);
findALLDirs(path);
printf("目前你总共写了%ld行代码!\n\n",total);
system("psuse);
return 0;
}
好像是没有include<io.h>这个头文件运行不了
冲冲冲
我已完成
n
66
本帖最后由 沉默中的程序猿 于 2021-10-2 10:20 编辑
1:因为计算机的CPU如人体的大脑只能读懂机器码(所谓的二进制语言)
2:机器码
4:解释性语言可以跨平太执行
5:也可以
6:源代码转换成字解码由解释器把字节码翻译成CPU读懂的语言
7:按照莫斯密码表把有规律的语言翻译成可供人阅读的语言
{:5_105:}
子文件
{:10_284:}抄代码也这么困难,看着一模一样,编译全是错误
0.因为它听不懂人话
1.编程语言
7.用特殊符号代替字母