自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 关于bootstrap-editable使用下拉框时表格中显示empty的解决办法

{ field: 'sys_user_type', title: '用户身份类别', editable: { type: 'select', title: '用户身份类别', ...

2019-06-12 15:10:59 2860

原创 题目:求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。

public static void main(String[] args) {  System.out.println("请输入相加的数和相加次数");  Scanner sc = new Scanner(System.in);  int a = sc.nextInt();  int z = a;  int num = sc.nextInt();  int b=1;  int sum=a;   ...

2018-04-04 17:39:31 2910

转载 统计

题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。public static void main(String[] args) {  System.out.println("请输入字符串:");  Scanner sc = new Scanner(System.in);  // 注:Scanner类中的next()方法遇到空格就不进去了,比如说输入haha  // nene就...

2018-04-04 17:38:25 126

原创 求最大公约数和最小公倍数

输入两个正整数m和n,求其最大公约数和最小公倍数。public static void main(String[] args) {  Scanner sc = new Scanner(System.in);  System.out.println("请输入第一个数字");  int a = sc.nextInt();  System.out.println("请输入第二个数字");  int b ...

2018-04-04 17:37:38 153

原创 条件运算符

题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示。public static void main(String[] args) {  Scanner sc = new Scanner(System.in);  System.out.println("请输入你的成绩");  int a = sc.nextInt();  s...

2018-04-04 17:36:30 302

原创 分解质因数

【程序4】 题目:将一个正整数分解质因数。例如:输入90,打印出90=2*3*3*5。public static void main(String[] args){  Scanner sc = new Scanner(System.in);  System.out.println("输入你需要的数字");  int a = sc.nextInt();  decompose(a);  sc.clos...

2018-04-04 17:35:26 178

原创 水仙花数

【程序3】 题目:打印出所有的"水仙花数",所谓"水仙花数"是指一个三位数, 其各位数字立方和等于该数本身。例如:153是一个"水仙花数", public static void main(String[] args) {  for (int i = 100; i <= 1000; i++) {   int a = i % 10;   int b = i / 10 % 10;   int c...

2018-04-04 17:33:32 116

原创 判断素数

//**判断101-200之间有多少个素数,并输出所有素数。 */public static void main(String[] args) {  int c = 0;  for (int i = 101; i <= 200; i++) {   boolean flag = true;// boolean初始设置为 true   for (int j = 2; j < i; j++)...

2018-04-04 17:30:49 134

原创 兔子生小兔子

/** *     题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,     小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问第20个月的兔子总数为多少?      程序分析: 兔子的规律为数列1,1,2,3,5,8,13,21....  *  * */public static void main(String[] args) {  int a=2;  int b=2...

2018-04-04 17:28:22 176

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除