Problem Description In this problem, you will write a program that reads a number of *and a shape number, and then draw

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Problem Description In this problem, you will write a program that reads a number of *and a shape number, and then draw

Post by answerhappygod »

Problem Description In This Problem You Will Write A Program That Reads A Number Of And A Shape Number And Then Draw 1
Problem Description In This Problem You Will Write A Program That Reads A Number Of And A Shape Number And Then Draw 1 (47.65 KiB) Viewed 19 times
import java.util.Scanner;
public class Problem4{ public static void main(String[] args){
Problem Description In this problem, you will write a program that reads a number of *and a shape number, and then draw that shape with the specified number of *. Input You will receive [from the user] the following as input (in order]: • An int specifying the number of * to be drawn • An int specifying which shape to drawn Processing 1. Using the given number of * and the shape number, drawn the following shapes: ****** ****** ****** ****** ****** ****** Shape 1 A cube with the same number of columns and rows *** *** *** *** *** *** Shape 2 A rectangle with twice the number of rows than columns. ****** ***** **** *** ** * Shape 3 An inverted pyramid that goes from the number of * to 1.
Examples Input LO 6 LO 3 Output ****** ****** ****** ****** ****** ****** *** *** *** *** *** *** ****** ***** **** ***
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply