平行宇宙001 发表于 2020-2-11 11:22:21


0.因为他只懂得二进制的0与1,无法直接下命令
1.机器语言
2.编译
3.编译型语言最终将源代码转化为机器语言,而解释型语言是将源代码转化为中间代码,然后发送给解释器,由解释器逐句翻译给cpu来执行
4.可以
5.它是将源码转化为中间代码,然后发送给解释器,由解释器逐句翻译给cpu来执行,因此可以实现跨平台的特性
6.将明文对着编码表翻译为“点横”组合的过程,我们称之为编码,反过来,将“点横”组合解密回原文的过程,叫做解码
7.亲们趁敌人吃饭时发动进攻

Sheltonxzx 发表于 2020-2-11 11:24:56

{:5_109:}我来学习啦~~~

小李小李 发表于 2020-2-11 11:47:45

.
.

二茂茂茂 发表于 2020-2-11 12:09:00

Nickels 发表于 2020-2-11 12:12:32

ok

wmsd 发表于 2020-2-11 12:14:11

查看参考答案

奶猫 发表于 2020-2-11 12:38:27

{:9_227:}新同学报道

lightrainkele 发表于 2020-2-11 12:38:40


#include<io.h>
#include<direct.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define MAX256

long total;

int countLines(const char *filename);
void fineALLCodes(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;       
}

奶猫 发表于 2020-2-11 12:49:13

最后的代码运行出来是
计算中...
目前你总共写了 0 行代码!

有点迷茫

月月yue 发表于 2020-2-11 13:01:24

本帖最后由 月月yue 于 2020-2-11 13:03 编辑

哈哈哈

中国boy 发表于 2020-2-11 13:04:01

310

阿giao 发表于 2020-2-11 13:07:57

鱼儿,加油

水东流 发表于 2020-2-11 13:09:06

1、因为它看不懂人类的语言
2、程序语言
3、编译
4、不能
5、不知道
6、编译
7、

duan05 发表于 2020-2-11 13:09:52

难受 有一行错了 不知道错哪了

guohua233 发表于 2020-2-11 13:13:50

萌新一枚

zshzsh 发表于 2020-2-11 13:48:51

做完了哦

雪城希 发表于 2020-2-11 14:00:12

你一共写了123行代码

黎仕勇 发表于 2020-2-11 14:08:54

答案

hummels0501 发表于 2020-2-11 14:10:15

谢谢鱼带我飞

无言之月 发表于 2020-2-11 14:14:34

谢谢楼主
页: 550 551 552 553 554 555 556 557 558 559 [560] 561 562 563 564 565 566 567 568 569
查看完整版本: S1E2:第一个程序 | 课后测试题及答案