35 lines
713 B
C
35 lines
713 B
C
//
|
|
// Created by bruno on 2/5/24.
|
|
//
|
|
|
|
#include "hviezdicky.h"
|
|
#include "stdio.h"
|
|
#include "termstuff.h"
|
|
|
|
|
|
int stars() {
|
|
int j; //stĺpec
|
|
int i; //riadok
|
|
int a; //počet riadkov
|
|
//int b; //počet stĺpcov
|
|
printf("Zadaj počet riadkov:");
|
|
scanf("%d", &a);
|
|
//printf("Zadaj počet stĺpcov:");
|
|
//scanf("%d", &b);
|
|
putchar('\n');
|
|
for (i = 0; i < a; i++) {
|
|
for (j = 0; j < a; j++) {
|
|
if (i % 2 != j % 2) {
|
|
white();
|
|
putchar(' ');
|
|
original();
|
|
} else {
|
|
black();
|
|
putchar(' ');
|
|
original();
|
|
}
|
|
}
|
|
putchar('\n');
|
|
}
|
|
return 0;
|
|
} |