Answered step by step
Verified Expert Solution
Question
1 Approved Answer
* This is for CS 101 Java class. I can only use for and do-while loops for this lab assignment. I cannot use while or
* This is for CS 101 Java class. I can only use "for" and do-while loops for this lab assignment. I cannot use while" or any other repetition method. *
Create a new project Lab05a. Write a program that asks the user for an integer N and a character and prints a shape on the screen using the given character and N. In each line, it should print the given character, from starting line 1 to N, and it should increase, i.e lineN should have N characters printed, and then it should start to decrease one by one as it goes below Sample run: Enter an integer: 3 Enter a character: * Sample run: Enter an integer 4 Enter a character: A
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started