int n=0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, Primer ejercicio!");
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
if(Serial.available() !=0) {
n = Serial.read();
if(n>'0' && n!='1' && n<='9'){
if(n % 2 != 0){
while(int i=0; i=n; i++){
while(int j=0; j=n; j++){
if(i==0 || i==n-1){
Serial.write('*');
}
else{
if(j==0 || j==n-1){
Serial.write('*');
}
}
}
Serial.println('\n');
Serial.println('\r');
}
}
}
}
}