1
daan
jhjh
甲鱼哥 我这个怎么弄啊
百度上也找了但是看不懂....求助求助{:5_92:}
https://pic.eehhtt.org/images/202108/71a1da2660df2de0.png
https://pic.eehhtt.org/images/202108/c8ebbe20d9fccb67.png
https://pic.eehhtt.org/images/202108/880f19a45ea79697.png
参考答案
我写完啦
累死鸟
11
自己敲了一遍然后复制粘贴了一遍,都发生错误了为什么QAQ。。。
11
目前你总共写了 8388608 行代码!
咋回事。。。
0.计算机只能识别二进制语言
1.机器语言
2.编译
3.编译型语言可以由汇编语言翻译成机械语言与CPU直接执行,而解释型语言需要用到解释器
4.不可以
5.由源代码转化成中间代码发送给解释器再由CPU执行
6.编译
7.亲们趁敌人吃饭时发起进攻
1:计算机只能识别二进制代码
2:机器语言
3:是否编译成机器码
4:能
5:通过解释器来在不同平台解释同样的代码
..
怎么还有问题,搞半天弄不好,原来是你设置的
参考答案
为什么复制的中文都是"???????"
1
查看答案
#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 findALLFiles(const char *path);
int countLines(const char *filename)
{
FILE *fp;
int count = 0;
int temp;
if ((fp = fopen(filename,"r")) == NULL)
{
fprintf(stderr,"Can not open the 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(thePath,path);
if((handle = _findfirst(strcat(thePath, "/*"), &fa)) == -1L)
{
fprintf(stderr, "The path %s is wrong!\n",path);
return;
}
do
{
if (!strcmp(fa.name, ".") || !strcmp(fa.name,".."))
continue;
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("目前你总共写了 %1d 行代码! \n\n",total);
system("pause");
return 0;
}