看答案
1
答案
答案
自认识0与1
0、只认识0和1两个数
1、汇编语言
2、编译
3、
4、不能够
5、
6、
66666
为什么那个求代码总和我只有当天可以求啊 今天打开就是0了,,,,,,,
行了
0
ε=(′ο`*)))唉
😉
haha~it's good!
0. 计算机采用高低电频来表示1/0,并且又1/0组合来表示一切含义,包括指令、数据,计算机只理解0/1两个二进制数, 大概是因为这个吧。
1. 机器语言.
2. 编译过程.
3. 编译:一切"翻译", 完整执行.
解释:逐句"翻译", 逐句执行.
4. 不行
5. 不知道
6. 事先建立明文和密文的对应集.
7. 你猜, 不会是:我爱鱼C工作室吧.
答案
棒棒哒
S1E2:第一个程序|课后测试题及答案
#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;
}
测试题答案
6