已知j**a数组a的长度为n,求数组a各元素之积?

三流之路 2024-05-28 06:04:40
最佳回答
public class testmain { public static void main(string[] args){ int[] arraya = {1,2,3,4,5,6}; system.out.println(multiplication(arraya)); } public static int multiplication(int[] array){ int count = 1; for (int i = 0; i < array.length; i++) { count *= array[i]; } return count; }} 20210311
汇率兑换计算器

类似问答
汇率兑换计算器

热门推荐
热门问答
最新问答
推荐问答
新手帮助
常见问题
房贷计算器-九子财经 | 备案号: 桂ICP备19010581号-1 商务联系 企鹅:2790-680461

特别声明:本网为公益网站,人人都可发布,所有内容为会员自行上传发布",本站不承担任何法律责任,如内容有该作者著作权或违规内容,请联系我们清空删除。