squareOfAsterisks方法。?例? [英] squareOfAsterisks method.? example?

查看:143
本文介绍了squareOfAsterisks方法。?例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写方法squareOfSymbols,显示一个实心矩形符号,其高度和宽度分别以整数参数高度和宽度指定。并且此方法还接收名为fillCharacter的char类型的第三个参数。例如,如果height为5,weight为4,fillCharacter为*,则该方法应显示****

****

****

****

****

将此方法合并到一个应用程序中,该应用程序从用户读取一个整数值并输出使用squareOfAsterisks方法的星号。

Write a method squareOfSymbols that displays a solid rectangle of symbols whose height and width are specified in integer parameter height and width respectively. And this method also receive a third parameter of type char called fillCharacter. For example, if height is 5, weight is 4, and the fillCharacter is *, the method should display ****
****
****
****
****
Incorporate this method into an application that reads an integer value for side from the user and outputs the asterisks with the squareOfAsterisks method.

推荐答案

所以,快乐的编码:这是你的功课,应该这样做(这只是问题几个循环)。当你遇到困难时,只询问具体问题。
So, happy coding: it is your homework and you should do it (it's just matter of a couple of loops). Ask here only specific questions when you get stuck.


这篇关于squareOfAsterisks方法。?例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆