Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Vrite a console C# program to do the following: 1. Ask user max number of characters. This should be an odd number if user enters

image text in transcribed
Vrite a console C\# program to do the following: 1. Ask user max number of characters. This should be an odd number if user enters even number add 1 to it to convert it to odd number. 2. Ask user characterl (C1) and character2 (C2) to print 3. Your program should then output two triangles ( (1st one is inverted) of base equal to number entered in #1 and made of characters in \#2. The characters printed should alternate between Cl and C2 4. Number of characters in one line of the triangle should differ by 2 from its next line such that the top of the triangle has only 1 character. 5. The top of the triangle (single character) should be centralized appropriately Example: If user enters 9 for \#1 and enters the '*' for Cl and '\#' for C2 (input for \#2) the program should print the following: HWH\#\#\#\#\#\#\#\# HAHHH \#H\#

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

Students also viewed these Databases questions