- 博客(4)
- 收藏
- 关注
原创 冒泡排序;实现对数组{25,42,12,38,76,10,56,28} 的排序。
源代码:public class maopao { public static void main(String[] args) { int [] arr= {25,42,12,36,76,10,56,28}; bubbleSort(arr); // TODO Auto-generated method stub } public static void printArray(in...
2019-03-15 22:45:12 2981
原创 请编写程序,实现计算“1!+2!+3++….+10!”的值。
源代码:public class digui { public static void main(String[] args) { int sum=0; for(int i=1;i<=10;i++) { int a1=getSum(i); sum=sum+a1; } System.out.println(“sum=”+sum); // TODO Auto-g...
2019-03-15 22:39:49 13026
原创 2、输入一行字符,分别统计出大写字母、小写字母、空格、数字和其它字符的个数。
源代码:import java.util.Scanner;public class tongji { public static void main(String[] args) { Scanner sca=new Scanner(System.in); String str=sca.nextLine(); int bigchar=0; int smallchar=0; ...
2019-03-15 22:37:01 7870
原创 统计一个公司五个销售小组中的平均销售额以及整个公司销售额。
源代码:public class xiaoshou { public static void main(String[] args) { int[][] arr=new int [5][]; arr[0]=new int [] {11,12}; arr[1]=new int [] {21,22,23}; arr[2]=new int [] {31,32,33,34}; arr...
2019-03-15 22:28:46 2354
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人