Im trying to print 12 columns and 5 rows using a for loop (one inside the other). Have tried many different permutations but just cant get my head around it! Please help. This is where i have got to. There have been many other variations but without success!!
Yeah, thats what I'm looking for, the printf method works fine but when I was using the code from my first post the characters printed out using val even though they were not in the columns and rows that I wanted, now when I change the code to the working version I get numbers instead of characters. Is this something to do with the print((val+x)+" ")?
What makes you think the char primitive type is a character? It is a number, and when you add x which is another number to it, val behaves as a number. Only when you keep chars away from other kinds of value will they behave as characters.
The %c operator forces the value back to a character.