iSpy52 发表于 2021-8-16 23:19:07

nice

vvv起飞啊 发表于 2021-8-17 00:21:35

参考答案

迪士尼的尔康 发表于 2021-8-17 00:23:26

?

xiaolanjing 发表于 2021-8-17 01:03:51

查看参考答案

名字很长 发表于 2021-8-17 02:14:42

0

hp233 发表于 2021-8-17 04:37:21

file:///D:/tim/SOMEting/MobileFile/Screenshot_2021-08-17-04-29-53-058_com.miui.notes.jpg
第一次使用论坛我不知道图片是否可以发出去
关于代码,我发现我检查不出来错误,但是报错的的地方我也挑不出毛病甚至我把原文复制粘贴过去还是显示那一行有错误。。。

陆离clcl 发表于 2021-8-17 09:22:39

0答案1 计算机会有许多bug 2 必须提供特殊的指令才能执行
1答案机器语言
2答案编译
3答案编译性语言直接被cpu执行
          解释性语言不能直接被cpu执行
4答案能
5答案源代码通过中间代码到解释器到cpu执行
6答案查表
7答案亲们 陈迪人吃饭时发动金东

姚之骢 发表于 2021-8-17 10:18:37

0.计算机只能根据程序完成任务
1.机器语言
2.编译
3.流程不同
4.部分不能
5.转化为字节码

缘来汝此 发表于 2021-8-17 11:31:38

0.快但是只认识0和1
1.机械语言
2.编译
3.编译过程
4.不能

M030824 发表于 2021-8-17 11:38:04

0.只认识0和1
1.编程语言
2.编译
3.传达指令时的方式不同
4.不可以
5.对于不同的系统有不同的翻译
6.指令的解读
7.亲们趁敌人吃饭时发动进攻

shihaidong 发表于 2021-8-17 11:51:40

hh

sbfnnn521 发表于 2021-8-17 11:51:52

做作业~~~~~~~

kzzypan 发表于 2021-8-17 11:52:25

老师讲的幽默生动

okeyHMD 发表于 2021-8-17 12:32:45

1

abyss~ 发表于 2021-8-17 12:39:15

答案

lsh96line 发表于 2021-8-17 12:43:25

1

2389666258 发表于 2021-8-17 13:23:04

66666666666666

彩虹直至黑 发表于 2021-8-17 15:12:47

0
机器语言
编译
一个是做菜 一个是打火锅
可以运行
都是基础编码啊
原理就是通过其中的汇编
idk

JUNKEL 发表于 2021-8-17 15:13:22

0

想自律的孩子 发表于 2021-8-17 15:32:51


#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;
}
页: 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 [1321] 1322 1323 1324 1325 1326 1327 1328 1329 1330
查看完整版本: S1E2:第一个程序 | 课后测试题及答案