Код: Выделить всё
#include
#include
#include
using namespace std;
int c1 = 0;
int c2 = 0;
int c3 = 0;
int c4 = 0;
int main ()
{
condition_variable cv;
for (int i = 15; i > -1; i = i - 1)
{
if ((c1 == 1) and (c2 == 1) and (c3 == 1))
{
int c4 = 1;
int c3 = 0;
int c2 = 0;
int c1 = 0;
}
if ((c1 == 1) and (c2 == 1))
{
int c3 = 1;
int c2 = 0;
int c1 = 0;
}
if (c1 == 1)
{
int c2 = 1;
int c1 = 0;
}
int c1 = (c1 + 1);
system("clear");
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79523847/trying-to-make-a-simple-binary-counter[/url]