FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certain order and then sum adjacent numbers t ...
分类:
其他好文 时间:
2016-09-20 19:36:19
阅读次数:
220
5.从键盘上输入一个正整数n,请按照以下五行杨辉三角形的显示方式, 输出杨辉三角形的前n行。请采用循环控制语句来实现。 (三角形腰上的数为1,其他位置的数为其上一行相邻两个数之和。) 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 Scanner sc=new ...
分类:
编程语言 时间:
2016-09-17 19:04:43
阅读次数:
136
Scanner sc=new Scanner(System.in); System.out.println("请输入一个正整数;"); int ss=sc.nextInt(); int[][]m=new int[ss][ss]; for(int i=0;i<ss;i++) { for(int j=0 ...
分类:
其他好文 时间:
2016-09-17 14:47:10
阅读次数:
177
package com.homework.zw;//此题没有太大难度,不再写注释import java.util.Scanner;public class work4 { public static void main(String[] args) { Scanner sc = new Scanne ...
分类:
其他好文 时间:
2016-09-16 16:52:22
阅读次数:
140
第六天28 1. 二维数组(理解)28 (1)就是元素为一维数组的一个数组。28 (2)格式:28 (3)案例(掌握):28 A:二维数组的遍历28 B:二维数组的求和28 C:杨辉三角形29 2. 两个思考题(理解)30 (1)Java中的参数传递问题30 (2)数据加密问题... ...
分类:
编程语言 时间:
2016-09-15 11:12:31
阅读次数:
253