Advertisement
RazorBlade57

Triangle2

Dec 14th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. //Β© A+ Computer Science - www.apluscompsci.com
  2. //Name -
  3. //Date -
  4. //Class -
  5. //Lab -
  6.  
  7. import static java.lang.System.*;
  8.  
  9. public class TriangleOne
  10. {
  11. private String word;
  12.  
  13. public TriangleOne()
  14. {
  15. word="";
  16. }
  17. public TriangleOne(String s)
  18. {
  19. word = "";
  20. for (i<= word.length(); i = 0; i++){
  21.  
  22. for(i = 0; 1 >= word; i++){
  23. String output = output + word;
  24. }
  25.  
  26. output = output + "\n";
  27. }
  28.  
  29.  
  30. }
  31.  
  32. public void setWord(String s)
  33. {
  34. word = s;
  35. }
  36.  
  37. public void print( )
  38. {
  39. System.out.println(TriangleOne());
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement