jiarenhao 发表于 2018-11-22 09:14:40

{:5_90:}

gelin3569 发表于 2018-11-22 13:51:28

1

ppy123 发表于 2018-11-22 16:07:50

1

Black.Watch 发表于 2018-11-22 21:52:36

0
只能识别0和1

jqi1994 发表于 2018-11-23 16:11:58

#include "stdio.h"

void main()
{
printf("谢谢小鱼\n");

}

梦见梦不见的梦 发表于 2018-11-23 19:16:14

{:5_90:}

你看我dio不 发表于 2018-11-23 22:53:01

答案

Drundrunk 发表于 2018-11-23 22:55:33

汇编语言

yemingqiu 发表于 2018-11-24 10:49:29

111

hl332422 发表于 2018-11-24 14:24:26

33

xyy_bxd 发表于 2018-11-24 14:56:27

0.计算机是二进制
1。机器语言
2.编译
3.解释型语言是利用字节而编译型语言是通过机器语言
4.可以
5.通过机器语言
6.通过莫斯密码的表
7.QFGR
CHEND
IRENC
HIFAN
SHIF
ADONG
JINGO
NG

阿秋里 发表于 2018-11-24 15:23:21

只识别机器语言
机器语言
编译
0
不能

hetuzaixian 发表于 2018-11-24 15:41:21

写的很好

我的鱼生 发表于 2018-11-24 16:01:56

??

mengook 发表于 2018-11-24 16:08:13

第一次写这么多的代码

阿秋里 发表于 2018-11-24 17:50:45

我竟然每次运行出来的代码行数竟然都不一样 327 328 427 428

清风逐梦丶 发表于 2018-11-24 18:14:48

回复

诗玖趁年华 发表于 2018-11-24 20:39:24

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

yade1234 发表于 2018-11-25 11:47:31

看答案

fhb 发表于 2018-11-25 13:33:19

应该是亲们。。。。。。
页: 200 201 202 203 204 205 206 207 208 209 [210] 211 212 213 214 215 216 217 218 219
查看完整版本: S1E2:第一个程序 | 课后测试题及答案