摘要: Primes.javapackage findPrimes; public class Primes { private final static int MAXPRIMES = 100; private boolean isDvisible(int a, int b) { if ((b % a) 阅读全文
posted @ 2018-03-25 21:45 张宁宁宁宁 阅读(76) 评论(0) 推荐(0) 编辑
摘要: (a) Draw the control flow graph for the printPrime() method. (b) Consider test cases ti = (n = 3) and t2 = ( n = 5). Although these tour the same prim 阅读全文
posted @ 2018-03-25 21:40 张宁宁宁宁 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 1.Identify the fault. 程序一:索引值i取不到0,数组中遗漏最后一个元素。 程序二:当搜索到第一个0时便返回其索引(并非最后一个0值) 2.If possible, identify a test case that does not execute the fault. 程序一 阅读全文
posted @ 2018-03-14 23:52 张宁宁宁宁 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 用c++编写输出一个杨辉三角,之前我的代码如下 #include<iostream> #include<iomanip> using namespace std; int main() { int array[80][80]; int row,col;int num; cout<<"请输入杨辉三角输 阅读全文
posted @ 2018-03-12 21:18 张宁宁宁宁 阅读(71) 评论(0) 推荐(0) 编辑