Answered step by step
Verified Expert Solution
Link Copied!

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. *

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions