printPrimes作业
2016-03-30 20:11
316 查看
(a)
(b)
数组越界问题
(c)
n=0
(d)
点覆盖:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
边覆盖:[(1,2), (2,3),(3,4),(4,5),(5,6),(6,7),(7,5),(6,8),(8,9),(5,9),(9,10),(10,11),(11,2),(2,12),(12,13),(13,14),(14,15),(15,13),(13,16)]
主路径覆盖:
[1,2,3,4,5,6,7]
[1,2,3,4,5,9,10,11]
[1,2,3,4,5,9,11]
[1,2,3,4,5,6,8,9,10,11]
[1,2,3,4,5,6,8,9,11]
[1,2,12,13,14,15]
[1,2,12,13,16]
[2,3,4,5,6,8,9,10,11,2]
[2,3,4,5,6,8,9,11,2]
[2,3,4,5,9,10,11,2]
[2,3,4,5,9,11,2]
[3,4,5,6,8,9,10,11,2,12,13,14,15]
[3,4,5,6,8,9,10,11,2,12,13,16]
[3,4,5,6,8,9,11,2,12,13,14,15]
[3,4,5,6,8,9,11,2,12,13,16]
[3,4,5,9,10,11,2,12,13,14,15]
[3,4,5,9,11,2,12,13,14,15]
[3,4,5,9,10,11,2,12,13,16]
[3,4,5,9,11,2,12,13,16]
[5,6,7,5]
[6,7,5,9,10,11,2,12,13,14,15]
[6,7,5,9,11,2,12,13,14,15]
[6,7,5,9,10,11,2,12,13,16]
[6,7,5,9,11,2,12,13,16]
[13,14,15,13]
[14,15,13,16]
测试代码:
import static org.junit.Assert.*; import org.junit.Test; import static org.junit.Assert.*; import org.junit.Test; public class TestPrimes { @Test public void testPrintPrimes() { printPrimes pp = new printPrimes(); pp.printPrimes(10); } }
相关文章推荐
- tftp服务器最简单安装配置
- PHP调用内容DES加密的SOAP接口
- PHP调用内容DES加密的SOAP接口
- php ajax dom---动态增加
- Thread详解10:用管道进行线程间通信
- LAMP组合 PHP以FPM模式工作
- phpcms的phpsso与discuz的UCenter的联调时遇到的问题
- php thinkphp+pgsql M('table')->add()不能正常的返回新增记录的主键id值。
- php thinkphp + pgsql table_msg()函数缺失解决方案
- My study note of PHP language(I)
- php mac环境下安装php pgsql扩展
- PHP对编码的常用处理函数
- PHP安全的URL字符串base64编码和解码
- php_CORS 跨域
- PHP性能优化
- YII2通过Composer安装方法
- phpexcel导入excel文件报the filename xxx is not recognised as an OLE file错误。
- PHP 打印函数之 print print_r
- php curl 发送get和post请求示例
- think php A方法