Java如何通过使用单个for循环优化此程序实例 [英] Java how to optimize this instance of program by using a single for loop
本文介绍了Java如何通过使用单个for循环优化此程序实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
*
**
***
****
您如何使用单个for循环打印此文件以降低复杂性并优化程序.它很好的两个for循环.
*
**
***
****
how do u print this using a single for loop for reducing the complexity and for optimizing the program. Its fine wid two for loops.
推荐答案
您了解从1到N计数然后停止的概念吗?然后尝试将其转换为一些代码步骤来解决您的问题.
Do you understand the concept of counting from 1 to N and then stopping? Then try and convert that into the few steps of code to solve your problem.
这篇关于Java如何通过使用单个for循环优化此程序实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文