I'm trying to print an isosceles triangle of asterisks (*) with height equal to b. Located inside it is a smaller isosceles triangle with height "a." I have to ask the user for two integers, a and b,...


I'm trying to print an isosceles triangle of asterisks (*) with height equal to b. Located inside it is a smaller isosceles triangle with height "a."


I have to ask the user for two integers, a and b, wherein b < 0,="" a="">< 0,="" b=""> a, and b - a is equal to an even number.


I've managed to code in the two triangles, however, I couldn't combine them. Attached below are two pictures of my output and the expected output.


If someone could show me the proper code on how to fix this, please do. Thank you!






Enter b: 10<br>Enter a: 4<br>a<br>aaa<br>aaaaa<br>aaaaaaa<br>

Extracted text: Enter b: 10 Enter a: 4 a aaa aaaaa aaaaaaa
Enter b: Enter a:<br>***<br>*****<br>***a***<br>***aaa***<br>***aaaaa***<br>***aaaaaaa***<br>****<br>

Extracted text: Enter b: Enter a: *** ***** ***a*** ***aaa*** ***aaaaa*** ***aaaaaaa*** ****

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here