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
Tag: ascii-art
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:
Display squares of asterisks, filled and hollow, side by side
I’m currently trying to display a filled asterisk square and a hollow asterisk : Instead, I’m getting this output: I’m not so sure how to make it side by side instead of up and down. Do I have to put the hollow nested loop inside the filled loop or do I have to do something else? Here is my code:
How to output an ASCII star patterns in a table format?
I need help with my code issue. I have to write a program that displays a star pattern in a table format. I am not exactly looking for the exact code, I would like to figure it out myself, so any suggestions and tips would be greatly helped. Answer Since you said you don’t want a full solution, here are
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: