include stdafx include stdio include conio include windows include loc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include <locale>
struct pole
{
unsigned i1:1;
unsigned i2:1;
unsigned i3:1;
unsigned i4:1;
unsigned i5:1;
unsigned i6:1;
unsigned i7:1;
unsigned i8:1;
};
int main(int) // вычисление остатка от деления на 2 , 4
{
setlocale(LC_ALL,"rus");
printf("Введите букву\n");
pole *pl;
char k;
for(char sim='a';sim<'z';sim++)
{
k=sim;
printf("%c",&k);
pl=(pole *)&k;
printf(" %d",pl->i1);
printf(" %d",pl->i2);
printf(" %d",pl->i3);
printf(" %d",pl->i4);
printf(" %d",pl->i5);
printf(" %d",pl->i6);
printf(" %d",pl->i7);
printf(" %d",pl->i8);
printf("\n");
}
getch();
}