Someone
public text v1 · immutable// k2.cpp : Defines the entry point for the console application.
// rysuje gwiadkami obwod kwadratu i jego przekatne. bok podaje user
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
int a, w, k;
printf("Podaj dlugosc boku figury:\n");
scanf("%i", &a);
for(w = 1; w <= a; ++w) {
for(k = 1; k <= a; ++k) {
if(w == 1 || w == a || k == 1 || k == a || k == w || k == a - w + 1) {
printf("*");
}
else {
printf(" ");
}
}
printf("\n");
}
}