题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示。 1.程序分析:(a>b)?a:b这是条件运算符的基本例子。
上传时间: 2015-01-08
上传用户:lifangyuan12
M个人排成一排,一次报数,报到N的人出列。剩下的人继续报数,并以出列的人的编号作为新的N值,知道所有的人都依次出列。给出每一轮出列的人和剩下的队列信息。 人数:10 出列数:3 1 2 3 4 5 6 7 8 9 10 3/4 5 6 7 8 9 10 1 2 9/10 1 2 4 5 6 7 8
标签:
上传时间: 2015-02-15
上传用户:sunjet
这是一个字母或数制之间的转化程序,5为主模块,调用模块1和模块7模块1又调用模块2、3、4和6四个模块,其中: 模块2实现小写字母向大写字母的转换 模块3实现大写字母向小写字母的转换 模块4实现二进制数向十六进制数的转换 模块6实现十六进制数向二进制数的转换 模块7实现十六进制数向十进制数的转换按“q”键退出。使用时,需将7个文件分别汇编,连接的方法为:5+1+2+3+4+6+7生成可执行文件“5” 即可运行。
上传时间: 2015-02-27
上传用户:hn891122
bp算法,网络为1-5-2-2-1。函数为y=sin(3x)cosx+1。这是用c语言写的,能运行,可以画图,这是神经网络的一个作业。
标签: 算法
上传时间: 2014-01-06
上传用户:qilin
设计一个自动售货机控制程序,它的投币口每次可以投入1元、2元、5元,且规定投入1元或2元后不得再投入5元。当投入总值等于或超过设定值(4元),售货机就自动送出货物并找回多余的钱。
上传时间: 2015-05-29
上传用户:Divine
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
标签: government streamline important alphabet
上传时间: 2015-06-09
上传用户:weixiao99
电力系统在台稳定计算式电力系统不正常运行方式的一种计算。它的任务是已知电力系统某一正常运行状态和受到某种扰动,计算电力系统所有发电机能否同步运行 1运行说明: 请输入初始功率S0,形如a+bi 请输入无限大系统母线电压V0 请输入系统等值电抗矩阵B 矩阵B有以下元素组成的行矩阵 1正常运行时的系统直轴等值电抗Xd 2故障运行时的系统直轴等值电抗X d 3故障切除后的系统直轴等值电抗 请输入惯性时间常数Tj 请输入时段数N 请输入哪个时段发生故障Ni 请输入每时段间隔的时间dt
上传时间: 2015-06-13
上传用户:it男一枚
这是一个字母或数制之间的转化程序,5为主模块,调用模块1和模块7 模块1又调用模块2、3、4和6四个模块,其中: 模块2实现小写字母向大写字母的转换 模块3实现大写字母向小写字母的转换 模块4实现二进制数向十六进制数的转换 模块6实现十六进制数向二进制数的转换 模块7实现十六进制数向十进制数的转换 按“q”键退出。 使用时,需将7个文件分别汇编,连接的方法为: 5+1+2+3+4+6+7 生成可执行文件“5” 即可运行。
上传时间: 2015-06-14
上传用户:许小华
写一个程序,列出在0和1之间的所有分母不大于N的最简分数,下面是N=5时的情况: 0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1 总共有11个分数! 还需要进行排序。
标签: 程序
上传时间: 2013-12-11
上传用户:chenbhdt
Hard-decision decoding scheme Codeword length (n) : 31 symbols. Message length (k) : 19 symbols. Error correction capability (t) : 6 symbols One symbol represents 5 bit. Uses GF(2^5) with primitive polynomial p(x) = X^5 X^2 + 1 Generator polynomial, g(x) = a^15 a^21*X + a^6*X^2 + a^15*X^3 + a^25*X^4 + a^17*X^5 + a^18*X^6 + a^30*X^7 + a^20*X^8 + a^23*X^9 + a^27*X^10 + a^24*X^11 + X^12. Note: a = alpha, primitive element in GF(2^5) and a^i is root of g(x) for i = 19, 20, ..., 30. Uses Verilog description with synthesizable RTL modelling. Consists of 5 main blocks: SC (Syndrome Computation), KES (Key Equation Solver), CSEE (Chien Search and Error Evaluator), Controller and FIFO Register.
标签: symbols length Hard-decision Codeword
上传时间: 2014-07-08
上传用户:曹云鹏