Advertisement
desislava_topuzakova

Untitled

Jan 11th, 2018
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import com.sun.org.apache.xpath.internal.SourceTree;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class p05_SquireOfStars1 {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. int n = Integer.parseInt(scanner.nextLine());
  10.  
  11. String firstAndLastRow = "";
  12.  
  13. firstAndLastRow = repeatText(textToRepeat "*", n);
  14.  
  15.  
  16. }
  17. static String repeatText (String textToRepeat, int count) {
  18. String text = "";
  19. for (int i = 0; i < count; i++) {
  20. text = text + textToRepeat;
  21. }
  22. return text;
  23. }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement