If you could help me with this method I would be very grateful!
Write a method that takes an integer argument w and returns without printing anything if w is less than 1 but otherwise prints out a triangle of asterisk sysmbols satisfying the following conditions: - Every line contains only space (' ') and asterisk ('*') symbols - Every line contains exactly w characters - There are w lines of output - The first line contains 1 asterisk, and, in general, the nth line contains n asterisks. - On every line all the asterisks appear at the end of the line. The only print methods you may use are System.out.print(char ch), which outputs a single character ch, and System.out.println() which terminates the current line (ie you may only output one character at a time and not whole strings of characters). Eg when called with the argument 4, the method will print out the four lines: * ** *** ****
Thank you so much for help and quick response! I am taking a Java exam at the end of August and I need all the help I can get - my university career depends on it - so cheers again!