0:只懂二进制的0和1
1:c语言
2:编译
3:编译语言计算机可以直接读懂,而解释型语言需要通过解释器解释
4:是
5:C语言
6:查表
7:亲们,趁敌人吃饭时发动进攻
0.0
感谢楼主无私奉献!
1
看答案
1
好难啊
第一课,希望自己能坚持下去
0
{:5_90:}
0
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("目前你总共写了 %ld 行代码!\n\n",total);
system("pause");
return 0;
}
抱歉啦
我运行以后显示只有13行我不知道为什么{:10_266:}
0.计算机只看得懂二进制
1.机器语言
2.编译
3.编译语言是转化为汇编语言再到机器语言解释语言是转化为字节码再由解释器翻译给计算机
4.不行
5.转化为字节码再由解释器翻译给计算机
6.长短音代表线和点,不同的点线组合代表不同的字母,用字母拼凑出语言信息
本帖最后由 YSKey 于 2021-8-3 14:06 编辑
211行代码
看看对不对
111
运行错误