Skip to content
Snippets Groups Projects
Commit e3403818 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Musterlösung 3.1.2019: Quelltext

parent cf7e8374
No related branches found
No related tags found
No related merge requests found
#include <stdio.h>
#include "aufgabe-1.xbm"
int main (void)
{
int line_bytes = (aufgabe_1_width + 7) / 8;
for (int i = 0; i < aufgabe_1_height; i++)
{
unsigned char *p = aufgabe_1_bits + i * line_bytes;
unsigned char mask = 0x01;
for (int j = 0; j < aufgabe_1_width; j++)
{
if (*p & mask)
printf ("*");
else
printf (" ");
mask <<= 1;
if (!mask)
{
mask = 0x01;
p++;
}
}
printf ("\n");
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment