vxct666999 发表于 2021-1-19 22:00:29

0.只能识别0 1
1.二进制数
2.编译
3.编译型语言是整桌菜做好一起吃
解释型是想吃哪个下哪个
4.可以
5.把源代码变成字节码,给不同平台的虚拟机调用
6.每个密码对应响应的字母
QINMENCHEND

datuimaoxia 发表于 2021-1-19 22:12:10

今天开始复习

1G2Z3 发表于 2021-1-19 22:16:43

D:\下载文件\图片\批注 2021-01-19 221522.png

1G2Z3 发表于 2021-1-19 22:18:04

file:///D:/%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6/%E5%9B%BE%E7%89%87/%E6%89%B9%E6%B3%A8%202021-01-19%20221522.png
请问为啥执行不了我抄写的

beststone86 发表于 2021-1-19 22:42:38

谢谢小甲鱼~非常感谢

岳tue 发表于 2021-1-19 22:53:36

1

JYT785479723 发表于 2021-1-19 23:21:13

105

跑堂的小猪 发表于 2021-1-19 23:23:03

看看

走在路上cool 发表于 2021-1-19 23:26:50

感谢小甲鱼!

a792722180 发表于 2021-1-20 00:28:22

作业做出来了,,但是截图图片太大上传不了{:10_266:}

zh1201 发表于 2021-1-20 01:20:29

{:10_277:}

lc825r 发表于 2021-1-20 10:08:29

看看答案

CJ0314 发表于 2021-1-20 11:38:48

#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 5s 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;
}

Twt20030127 发表于 2021-1-20 11:50:42

我会了

枫影. 发表于 2021-1-20 11:56:55

2进制
机器语言
编译

马可樱桃 发表于 2021-1-20 12:51:28

答案

眼镜进蟒蛇 发表于 2021-1-20 13:13:37

完成作业

啦啦啦95426 发表于 2021-1-20 13:32:21

0计算机是二进制
1机器语言
2编译
3是否需要编译
4可以

whionsh 发表于 2021-1-20 13:57:18

Ww

Ariesl 发表于 2021-1-20 14:11:44

{:5_102:}
页: 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 [1022] 1023 1024 1025 1026 1027 1028 1029 1030 1031
查看完整版本: S1E2:第一个程序 | 课后测试题及答案