General-xd 发表于 2023-4-21 21:43:20

对照

Jake-zero 发表于 2023-4-21 21:52:03

vscode好多麻烦事

Kaiser99916 发表于 2023-4-21 23:02:25

{:9_240:}

佛手 发表于 2023-4-21 23:48:58

看看答案

XTXY 发表于 2023-4-22 10:29:50

已完成

Jack_August 发表于 2023-4-22 12:37:36

0.不知道
1.机器语言
2.编译
3.对解释执行而言,程序运行时的控制权在解释器而不在用户程序;对编译执行而言,运行时的控制权在用户程序。
4.不能
5.通过语言解释器来实现跨平台
6.把每个英文字符,以长(嗒)短(滴)两种信号的组合来替代,接收端根据收到的信号再加以解码。(加密与解密)

kwhsy_ 发表于 2023-4-22 14:03:15

{:5_103:}

Crayfish. 发表于 2023-4-22 14:09:06

朕要答案

Oliviaaaaaaa 发表于 2023-4-22 15:44:31

1

银河以北 发表于 2023-4-22 16:57:07

1.编译型语言:经过编译后,会生成二进制的文件,这个二进制文件可以被CPU执行。

2.解释型语言:解释型语言是直接执行的源码,解释器解释后的源码直接被CPU执行了。

xiaochennn 发表于 2023-4-22 17:06:59

答案

15197979128qaq 发表于 2023-4-22 19:39:19

6

帮帮i帮帮 发表于 2023-4-22 22:14:04

鱼C有你更精彩^_^

神荼Q 发表于 2023-4-23 10:08:35

qinmen chendirenchifanshifadongjingong
亲们,趁敌人吃饭时发动进攻

sujinguo 发表于 2023-4-23 14:14:21

1

xiaochennn 发表于 2023-4-23 14:55:51

.

15291490070 发表于 2023-4-23 16:34:04

1

15291490070 发表于 2023-4-23 16:53:38

为啥我是204,有大佬知道吗

阿雨要学习 发表于 2023-4-23 19:20:57

1

2023考研上岸 发表于 2023-4-23 21:12:27


#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 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 = fget(fp)) !=EOF)
                {
                        if(temp == '\n')
                                {
                                        count++;
                          }
                }

      fclose(fp);
      
      return count;
}

void find ALLCodes(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,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("目前你总共写了%1d 行代码! \n\n", total);
          system("pause");
          
          return 0;
}
页: 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 [1887] 1888 1889 1890 1891 1892 1893 1894 1895 1896
查看完整版本: S1E2:第一个程序 | 课后测试题及答案