Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.sun.org.apache.xpath.internal.SourceTree;
- import java.util.Scanner;
- public class p05_SquireOfStars1 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- String firstAndLastRow = "";
- firstAndLastRow = repeatText(textToRepeat "*", n);
- }
- static String repeatText (String textToRepeat, int count) {
- String text = "";
- for (int i = 0; i < count; i++) {
- text = text + textToRepeat;
- }
- return text;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement