Untitled

mail@pastecode.io avatar
unknown
java
2 years ago
545 B
2
Indexable
Never
import java.util.Scanner;

public class Glavni {
public static void main (String [] args) {
	
System.out.println("Vpišite velikost pravokotnika.");
Scanner in = new Scanner(System.in);
	
int j = in.nextInt();
String nvm = "*";
int k;
int l;
for(int i=0; i<j; i++) {
	if(j%10!=0) {
		j=j*10;
	}
	if(i%10==0 && i!=0) {
		System.out.println();
	}
	k=i-1;
	l=i+1;
	if(k%10==0 && l%10==0 && i<10 && i>j-10) {
      System.out.print(nvm);
	} else {
		System.out.print(" ");
	}
}


















}
}