实验目的:让学生掌握开发Java应用程序的三个步骤:编写源文件、编译源文件和运行应用程序。掌握Java程序的基本语句。 1、试编写一个程序,将1~500间能同时被2,5,7整除的数打印出来。 2、试编写一个程序,显示如图所示的一个数字金字塔。 1 121 12321 1234321 123454321 12345654321 1234567654321 123456787654321 12345678987654321 3、如果我国的经济增长以每年7.5%的速度保持稳定不变,试编写一个程序,计算过多少年可以实现总量翻两番?
上传时间: 2016-01-15
上传用户:风之骄子
We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
标签: represented integers group items
上传时间: 2016-01-17
上传用户:jeffery
The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).
标签: converts Toolbox complex logical
上传时间: 2016-02-12
上传用户:a673761058
自动卖报机,5分一份,有1,2,5分类型的硬币。verilog状态机
标签: 自动
上传时间: 2013-12-20
上传用户:BIBI
1. 课程设计的任务 本次课程设计的任务是实现一个算术逻辑运算单元,使之能够完成不带进位位算术、逻辑八位二进制数的运算。由具有扩展能力强,结构简单清晰,连线方便快捷的总线结构作为系统结构。系统测试采用在系统的每个总线上设置测试孔。采用闪存存储数据,系统可以通过监测模块来修改和控制微程序的运行。 采用若干种类的芯片组作为运算器和数据输入输出缓冲、输入锁存器,其中2片74LS181构成8位字长的ALU单元是算术逻辑运算单元核心。
标签: 算术逻辑运算
上传时间: 2014-01-12
上传用户:123456wh
约瑟夫环问题 以7个人为例,用链表实现,每个人都有自己的密码,当他出列时,以他的密码作为下一个的个数,例这七个人的密码分别是3,1,7,2,4,8,4。第一个执行的个数是20
标签:
上传时间: 2016-04-04
上传用户:anng
本计算器实现了如下两个功能: 1、windows自带计算器的键盘输入加减乘除,目前没有连续运算功能操作:用户用键盘或者鼠标分别输入‘1’,‘+’,‘2’,按‘=’ 文本框显示运算结果‘3’。 2、表达式运算功能,目前只支持整数运算。操作:选择菜单Option->Expression,在文本框用键盘输入表达式如‘12/2+(4*5/4)*6’,按计算器上‘=’,文本框显示运算结果 ‘12/2+(4*5/4)*6=36’。 3、换肤功能 提供了4种skin,可以自由切换。操作:菜单Skin->Load Skin,选择skin文件。
上传时间: 2016-06-30
上传用户:凤临西北
本程序使用MSP430F149驱动DS1302;DS1302 能够计算秒、分、时、日、周、月、年,自动补偿 2100 年之前的闰年日期;2.0V~5.5V 的供电电压,三线制的串行通信接口,且内置 31 字节的可由电池维持数据的静态 RAM,用户可自由使用。DS1302 的最大特色是支持双电源供电,VCC2 连接主电源,VCC1 连接备用电池。当VCC2 的电压高于 VCC1 时,芯片从 VCC2 处获得能量并且可以通过涓流充电的方式对VCC1 连接的电池进行充电;当 VCC2 的电源断开连接时,芯片内部自动切换到从VCC1 处取电,从而保证即使在系统板掉电的情况下,DS1302 仍能进行正确计时功能且保存在 RAM 中的数据不丢失
上传时间: 2014-01-03
上传用户:kelimu
基于DSP的fft汇编程序,使用的是基-2法,以8点FFT为例
上传时间: 2016-07-22
上传用户:lx9076
简单的计算器 1.键盘输入两个10进制数据(1到4位),选择实现加、减、乘、除运算,并选择以2进制、8进制、10进制、16进制方式输入。 要求: 程序界面尽量方便使用并简洁。
上传时间: 2014-01-21
上传用户:顶得柱