Skip to content
Advertisement

Tag: ascii-art

Java integer increases unintended

I have a function that takes String and a char[] type variables as parameter. String line is a line of ascii art and the char[] fileChars consists of the characters that are used in the string mentioned beforehand. Example of line: “@@@@@@@@@@—” Example of fileChars: [-, @] Algorithm works in the following manner: given a row of data, the algorithm

Invert incrementing triangle pattern

I am writing some code that creates a incrementing number right angle triangle that looks something like this: I am unsure on how to make my code output a triangle to that shape as my code outputs the same thing except inverted. This is the code I have: My speculation is that instead of incrementing some of the values I

Printing a squares triangle. How to mirror numbers?

So I’ve been working on this lab for a while now for my programming class and so far I think I’m on the right track. However, I’m not quite sure how to mirror the numbers. So pretty much, my code is only printing the top half of the triangle. Anyway here is the actual assignment that was given to us:

Draw an ASCII diamond in a frame

I am trying to draw out a diamond in a frame. I figured my way through the top half, but when I come to the 2nd half I had attempted to invert the loops and problems came up. I played around switching operators just to see the result, but still nothing works. Please help. What am I not seeing. Answer

Making an ASCII rhombus with loops

I got a problem to create a rhombus, my code here: However, the output is: I think the problem is in the code which I highlighted. Answer You are right in indicating the possible problematic line. Surprised that you did it right in first half:

Advertisement