题目已做完,对照答案
看看哪里错
dev c++总共执行了0行代码???
asas
1
0.计算机只识别二进制语言
1.二进制汇编语言
2.编译型语言直接转化为二进制语言, 解释型语言需要翻译器
3.可以, C语言具有可移植性
看一看如何
讲的很合理清晰
1.因为计算机只能直接识别机器语言2.机器语言
测试题答案
回复
0、一句简单的话,机器要经过非常非常长的进制转换打印输出
1、机器语言
2、编码
3、前者效率更高
4、能
5、通过解释器
6、通过一系列的点和线连接在一起
7、
请问
对一下答案{:5_97:}
答案
#include<io.h>
#include<direct.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 256
总数;
int countLines(const char * filename);
void findAllCodes(const char * path);
void findAllFiles(const char * path);
int countiLines(const char * filename)
{
FILE * fp;
int count = 0;
int temp;
if ((fp = fopen_s(filename, "r") ) == NULL)
{
fprintf(stderr, "无法打开文件:%s\n", filename);
return 0;
}
while ((temp = fgetc(fp)) != EOF)
{
if (temp == '\n')
{
总数++;
}
}
FCLOSE(fp);
return 总数;
}
void findAllCodes(const char * path)
{
struct _finddata_t fa;
int handle;
char thePath, 目标,总计;
strcpy_s(thePath, path);
if ((handle = _findfirst(strcat_s(thePath, "\*。c"), &fa)) != -1L)
{
{
sprintf_s(目标,"%s/%s",path,fa.name);
总计+= countLines(目标);
}while (_findnext(handle, &fa) == 0);
}
_findclose(handle);
}
void findAllDirs(const char* path)
{
struct _finddata_t fa;
int handle;
char thePath;
strcpy_s(thePath, path);
if ((handle = _findfirst(strcat_s(thePath, "/ *"), &fa)) == -1L)
{
fprintf(stderr, "路径%s错了!\n", thePath);
return;
}
{
if (!strcmp(fa.name,"。") || !strcmp(fa.name,".."))
if (fa.attrib == _A_SUBDIR)
{
sprintf_s(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("目前你总共写了%d行代码!\n\n", 总计);
system("pause");
return 0;
}
打卡!
qinmenchendirenchifgshfanonGwingong
不会啊
666666666666666