虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

if-else-end

  • 词法分析程序

    词法分析程序,可对以下的C源程序进行分析:main() {int a[12] ,sum for(i=1 i<=12 i++) {for(j=1 j<=12 j++)scanf("%d",&a[i][j]) } for(i=12 i>=1 i--){ for(j=12 j>=1 j--){ if(i==j&&i+j==13)sum+=a[i][j] } } printf("%c",sum) }

    标签: 程序

    上传时间: 2013-12-26

    上传用户:skhlm

  • 经典c程序100例==1--10 【程序1】 题目:有1、2、3、4个数字

    经典c程序100例==1--10 【程序1】 题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 1.程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去       掉不满足条件的排列。 2.程序源代码: main() { int i,j,k printf("\n") for(i=1 i<5 i++)    /*以下为三重循环*/  for(j=1 j<5 j++)    for (k=1 k<5 k++)    {     if (i!=k&&i!=j&&j!=k)    /*确保i、j、k三位互不相同*/     printf("%d,%d,%d\n",i,j,k)    }

    标签: 100 程序 10 数字

    上传时间: 2014-01-07

    上传用户:lizhizheng88

  • In each step the LZSS algorithm sends either a character or a <position, length> pair. Among t

    In each step the LZSS algorithm sends either a character or a <position, length> pair. Among these, perhaps character "e" appears more frequently than "x", and a <position, length> pair of length 3 might be commoner than one of length 18, say. Thus, if we encode the more frequent in fewer bits and the less frequent in more bits, the total length of the encoded text will be diminished. This consideration suggests that we use Huffman or arithmetic coding, preferably of adaptive kind, along with LZSS.

    标签: algorithm character position either

    上传时间: 2014-01-27

    上传用户:wang0123456789

  • UnZip is a small zipfile extract utility. It is written to be assmall portable as possible and is in

    UnZip is a small zipfile extract utility. It is written to be assmall portable as possible and is intended to be starting point for im-plementation of .ZIP files in non-IBM environments.Source code is provided in C and Turbo Pascal. If you port this programto a non-IBM system, I would appreciate a copy of the ported source andexe files.

    标签: is portable possible extract

    上传时间: 2014-01-20

    上传用户:维子哥哥

  • This program demonstrates how to do disconnected briefcase applications with ADO. When the Connected

    This program demonstrates how to do disconnected briefcase applications with ADO. When the Connected checkbox is unchecked the application is switched into offline mode. If the application is exited at that point then the data is persisted to a file on disk (along with any edits to the data). When the application is restarted it will load the persisted data if present, otherwise it will fetch the data from the database.

    标签: demonstrates applications disconnected Connected

    上传时间: 2015-03-24

    上传用户:xcy122677

  • 啥也不说了

    啥也不说了,请看代码示例 File : fat_dir.c FS_DIR *FS__fat_opendir(const char *pDirName, FS_DIR *pDir) { FS_size_t len FS_u32 unit FS_u32 dstart ....... FS_u32 dsize FS_i32 i char realname[12] char *filename if (!pDir) { return 0 /* No valid pointer to a FS_DIR structure */ }

    标签:

    上传时间: 2013-12-14

    上传用户:梧桐

  • Altera recommends the following system configuration: * Pentium II 400 with 512-MB system memory (fa

    Altera recommends the following system configuration: * Pentium II 400 with 512-MB system memory (faster systems give better software performance) * SVGA monitor * CD-ROM drive * One or more of the following I/O ports: - USB port (if using Windows XP or Windows 2000) for USB-Blaster(TM) or MasterBlaster(TM) communications cables, or APU programming unit - Parallel port for ByteBlasterMV(TM) or ByteBlaster(TM) II download cables - Serial port for MasterBlaster communications cable * TCP/IP networking protocol installed * Windows 2000, Windows NT 4.0 with Service Pack 3 or later, or Windows XP * Internet Explorer 5.0 or later Memory & Disk Space Requirements USB开发

    标签: system configuration recommends following

    上传时间: 2015-03-27

    上传用户:13188549192

  • C++完美演绎 经典算法 如 /* 头文件:my_Include.h */ #include <stdio.h> /* 展开C语言的内建函数指令 */ #define PI 3.141

    C++完美演绎 经典算法 如 /* 头文件:my_Include.h */ #include <stdio.h> /* 展开C语言的内建函数指令 */ #define PI 3.1415926 /* 宏常量,在稍后章节再详解 */ #define circle(radius) (PI*radius*radius) /* 宏函数,圆的面积 */ /* 将比较数值大小的函数写在自编include文件内 */ int show_big_or_small (int a,int b,int c) { int tmp if (a>b) { tmp = a a = b b = tmp } if (b>c) { tmp = b b = c c = tmp } if (a>b) { tmp = a a = b b = tmp } printf("由小至大排序之后的结果:%d %d %d\n", a, b, c) } 程序执行结果: 由小至大排序之后的结果:1 2 3 可将内建函数的include文件展开在自编的include文件中 圆圈的面积是=201.0619264

    标签: my_Include include define 3.141

    上传时间: 2014-01-17

    上传用户:epson850

  • 词法分析器 对输入的程序进行分析

    词法分析器 对输入的程序进行分析,将关键字,保留字与系统标识符分开,并对其属性进行说明。 建立数组,将单词读入,对单词的ASCII码进行判断,将在ASCII码值在一定区间进行区分(使用if语句来判断),分开来后,对其所在ASCII值区间的不同,给予以不同的属性(比如:系统保留字…),词法分析器完成后要能识别+,-,=等字符。

    标签: 分析器 输入 程序

    上传时间: 2014-01-04

    上传用户:王楚楚

  • 此为编译原理实验报告 学习消除文法左递规算法

    此为编译原理实验报告 学习消除文法左递规算法,了解消除文法左递规在语法分析中的作用 内含 设计算法 目的 源码 等等.... 算法:消除左递归算法为: (1)把文法G的所有非终结符按任一种顺序排列成P1,P2,…Pn 按此顺序执行 (2)FOR i:=1 TO n DO BEGIN FOR j:=1 DO 把形如Pi→Pjγ的规则改写成 Pi→δ1γ δ2γ … δkγ。其中Pj→δ1 δ2 … δk是关于Pj的所有规则; 消除关于Pi规则的直接左递归性 END (3)化简由(2)所得的文法。即去除那些从开始符号出发永远无法到达的非终结符的 产生规则。

    标签: 编译原理 实验报告 算法

    上传时间: 2015-03-29

    上传用户:极客