Write a method called pyramid that takes a number, a character, and a boolean as parameters. Then the method should print a pyramid accord- ing to parameters (please see the example below). In the main method, ask user to enter values for your method’s parameters and call your method. OUTPUT: ENTER A NUMBER 3 ENTER A CHARACTER o Is pyramid upside down? false o oo ooo

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter7: Using Methods
Section: Chapter Questions
Problem 2CP
icon
Related questions
Question

FOR JAVA

Write a method called pyramid that takes a number, a character, and a boolean as parameters. Then the method should print a pyramid accord- ing to parameters (please see the example below). In the main method, ask user to enter values for your method’s parameters and call your method.

OUTPUT:
ENTER A NUMBER
3
ENTER A CHARACTER
o
Is pyramid upside down?
false
o
oo
ooo
Enter a number
5
Enter a character
*
Is pyramid upside down?
true
*****
****
***
**
*

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Math class and its different methods
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,