文件名称:ds8
-
所属分类:
- 标签属性:
- 上传时间:2014-05-11
-
文件大小:800byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
符号平衡问题
在语言中往往需要判断一些符号是否是成对出现的,比如{}、[]、()。如何让判断符号的对称也是很多语言的语法检查的首要任务。
设计一个函数来检查表达式中的符号()、[]、{}是否平衡。若平衡,返回1;若不平衡返回0。
例如:
a(dda){[dfsafd[dfsd]](((fdsd)dfd))dfd}是符号平衡的。
{ad[x(df)ds)]}不是符号平衡的。
-Symbols balance
In language often needs to determine whether some of the symbols appear in pairs, such as {}, [], (). How to determine the symbol symmetrical primary task is a lot of language syntax checking.
Design a function to check the expression of the symbol (), [], {} is balanced. If the balance returns 1 returns 0 if the imbalance.
For example:
a (dda) {[dfsafd [dfsd]] (((fdsd) dfd)) dfd} is a symbol balanced.
{ad [x (df) ds)]} is not a symbol balanced.
在语言中往往需要判断一些符号是否是成对出现的,比如{}、[]、()。如何让判断符号的对称也是很多语言的语法检查的首要任务。
设计一个函数来检查表达式中的符号()、[]、{}是否平衡。若平衡,返回1;若不平衡返回0。
例如:
a(dda){[dfsafd[dfsd]](((fdsd)dfd))dfd}是符号平衡的。
{ad[x(df)ds)]}不是符号平衡的。
-Symbols balance
In language often needs to determine whether some of the symbols appear in pairs, such as {}, [], (). How to determine the symbol symmetrical primary task is a lot of language syntax checking.
Design a function to check the expression of the symbol (), [], {} is balanced. If the balance returns 1 returns 0 if the imbalance.
For example:
a (dda) {[dfsafd [dfsd]] (((fdsd) dfd)) dfd} is a symbol balanced.
{ad [x (df) ds)]} is not a symbol balanced.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ds8.c
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
