dos_compilers/Zortech C++ v206/TOOLS/SOURCE/BVTEST.CPP
2024-07-02 07:30:38 -07:00

23 lines
471 B
C++

#include <stream.hpp>
#include <string.h>
#include <bitvec.hpp>
#define NL "\n"
main()
{
bitvec a(20);
int i;
for (i = 3; i < 20; i += 3)
a.set(i);
bitvec c = a;
for (i = 0; i < 20; ++i)
cout << i << " " << a[i] << NL;
for (i = 3; i < 20; i += 3)
a.reset(i);
for (i = 0; i < 20; ++i)
cout << i << " " << a[i] << NL;
for (i = 0; i < 20; ++i)
cout << i << " " << c[i] << NL;
}