All pastes #420778 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-02 11:51 UTC
rendered paste body
// k2.cpp : Defines the entry point for the console application.
//

#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");
		}
}